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:
b83d907
)
avformat/id3v2: fix memleak with empty strings
author
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 11 Aug 2016 12:10:19 +0000
(14:10 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 11 Aug 2016 12:10:19 +0000
(14:10 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/id3v2.c
patch
|
blob
|
history
diff --git
a/libavformat/id3v2.c
b/libavformat/id3v2.c
index
921a7c2
..
9969d7a
100644
(file)
--- a/
libavformat/id3v2.c
+++ b/
libavformat/id3v2.c
@@
-422,7
+422,10
@@
static void read_comment(AVFormatContext *s, AVIOContext *pb, int taglen,
return;
}
return;
}
- if (dst && dst[0]) {
+ if (dst && !*dst)
+ av_freep(&dst);
+
+ if (dst) {
key = (const char *) dst;
dict_flags |= AV_DICT_DONT_STRDUP_KEY;
}
key = (const char *) dst;
dict_flags |= AV_DICT_DONT_STRDUP_KEY;
}