projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5778299
)
opt: avoid segfault in av_opt_next() if the class does not have an option list
author
Justin Ruggles
<justin.ruggles@gmail.com>
Thu, 8 Nov 2012 23:35:49 +0000
(18:35 -0500)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Sat, 22 Dec 2012 20:43:27 +0000
(15:43 -0500)
CC: libav-stable@libav.org
libavutil/opt.c
patch
|
blob
|
history
diff --git
a/libavutil/opt.c
b/libavutil/opt.c
index
e199170
..
8a98a9e
100644
(file)
--- a/
libavutil/opt.c
+++ b/
libavutil/opt.c
@@
-37,8
+37,10
@@
const AVOption *av_opt_next(void *obj, const AVOption *last)
{
AVClass *class = *(AVClass**)obj;
- if (!last && class->option[0].name) return class->option;
- if (last && last[1].name) return ++last;
+ if (!last && class->option && class->option[0].name)
+ return class->option;
+ if (last && last[1].name)
+ return ++last;
return NULL;
}