* qatar/master:
rtpdec_h264: Check the return value of functions doing allocations
See: c5f15f40b9b25f033fd9e8dd1e12763913098c11
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -248,7 +248,8 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data, |
248 | 248 |
if (pass == 0) { |
249 | 249 |
/* now we know the total size of the packet (with the |
250 | 250 |
* start sequences added) */ |
251 |
- av_new_packet(pkt, total_length); |
|
251 |
+ if ((result = av_new_packet(pkt, total_length)) < 0) |
|
252 |
+ return result; |
|
252 | 253 |
dst = pkt->data; |
253 | 254 |
} else { |
254 | 255 |
assert(dst - pkt->data == total_length); |