git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b52e9d
)
libschroedingerdec: check malloc
author
Jordi Ortiz
<nenjordi@gmail.com>
Thu, 26 Apr 2012 19:14:07 +0000
(21:14 +0200)
committer
Diego Biurrun
<diego@biurrun.de>
Sat, 28 Apr 2012 13:11:18 +0000
(15:11 +0200)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
libavcodec/libschroedingerdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/libschroedingerdec.c
b/libavcodec/libschroedingerdec.c
index
f573d8a
..
68d9a25
100644
(file)
--- a/
libavcodec/libschroedingerdec.c
+++ b/
libavcodec/libschroedingerdec.c
@@
-106,6
+106,11
@@
static SchroBuffer *FindNextSchroParseUnit(SchroParseUnitContext *parse_ctx)
return NULL;
in_buf = av_malloc(next_pu_offset);
+ if (!in_buf) {
+ av_log(parse_ctx, AV_LOG_ERROR, "Unable to allocate input buffer\n");
+ return NULL;
+ }
+
memcpy(in_buf, parse_ctx->buf, next_pu_offset);
enc_buf = schro_buffer_new_with_data(in_buf, next_pu_offset);
enc_buf->free = libschroedinger_decode_buffer_free;