projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcb1555
)
lavf: Avoid using av_malloc(0) in av_dump_format
author
Martin Storsjö
<martin@martin.st>
Fri, 30 Sep 2011 17:30:35 +0000
(20:30 +0300)
committer
Martin Storsjö
<martin@martin.st>
Fri, 30 Sep 2011 19:31:30 +0000
(22:31 +0300)
On OS X, av_malloc(0) returns pointers that cause crashes when
freed.
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/utils.c
patch
|
blob
|
blame
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
d0ad358
..
0ba6fc3
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-3333,7
+3333,7
@@
void av_dump_format(AVFormatContext *ic,
int is_output)
{
int i;
- uint8_t *printed =
av_mallocz(ic->nb_streams)
;
+ uint8_t *printed =
ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL
;
if (ic->nb_streams && !printed)
return;