[FFmpeg-cvslog] r24191 - trunk/libavformat/rtpdec_h264.c
lu_zero
subversion
Sun Jul 11 13:54:48 CEST 2010
Author: lu_zero
Date: Sun Jul 11 13:54:48 2010
New Revision: 24191
Log:
Handle av_base64_decode return value
garbled sdp would cause crash otherwise.
Modified:
trunk/libavformat/rtpdec_h264.c
Modified: trunk/libavformat/rtpdec_h264.c
==============================================================================
--- trunk/libavformat/rtpdec_h264.c Sun Jul 11 13:49:44 2010 (r24190)
+++ trunk/libavformat/rtpdec_h264.c Sun Jul 11 13:54:48 2010 (r24191)
@@ -120,7 +120,7 @@ static int sdp_parse_fmtp_config_h264(AV
while (*value) {
char base64packet[1024];
uint8_t decoded_packet[1024];
- uint32_t packet_size;
+ int packet_size;
char *dst = base64packet;
while (*value && *value != ','
@@ -133,7 +133,7 @@ static int sdp_parse_fmtp_config_h264(AV
value++;
packet_size= av_base64_decode(decoded_packet, base64packet, sizeof(decoded_packet));
- if (packet_size) {
+ if (packet_size > 0) {
uint8_t *dest = av_malloc(packet_size + sizeof(start_sequence) +
codec->extradata_size +
FF_INPUT_BUFFER_PADDING_SIZE);
More information about the ffmpeg-cvslog
mailing list