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:
c3517c3
)
avcodec/ass_split: check ASSSplitContext alloc
author
Clément Bœsch
<u@pkh.me>
Sat, 13 Jun 2015 18:39:57 +0000
(20:39 +0200)
committer
Clément Bœsch
<u@pkh.me>
Sat, 13 Jun 2015 18:39:57 +0000
(20:39 +0200)
libavcodec/ass_split.c
patch
|
blob
|
history
diff --git
a/libavcodec/ass_split.c
b/libavcodec/ass_split.c
index
2458cb9
..
9bc7b9d
100644
(file)
--- a/
libavcodec/ass_split.c
+++ b/
libavcodec/ass_split.c
@@
-356,6
+356,8
@@
static int ass_split(ASSSplitContext *ctx, const char *buf)
ASSSplitContext *ff_ass_split(const char *buf)
{
ASSSplitContext *ctx = av_mallocz(sizeof(*ctx));
ASSSplitContext *ff_ass_split(const char *buf)
{
ASSSplitContext *ctx = av_mallocz(sizeof(*ctx));
+ if (!ctx)
+ return NULL;
ctx->current_section = -1;
if (ass_split(ctx, buf) < 0) {
ff_ass_split_free(ctx);
ctx->current_section = -1;
if (ass_split(ctx, buf) < 0) {
ff_ass_split_free(ctx);