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:
c31afa5
)
id3v2: check for enough space to write full UTF-8 characters.
author
Anton Khirnov
<wyskas@gmail.com>
Wed, 23 Sep 2009 18:04:40 +0000
(18:04 +0000)
committer
Diego Biurrun
<diego@biurrun.de>
Wed, 23 Sep 2009 18:04:40 +0000
(18:04 +0000)
patch by Anton Khirnov, wyskas gmail com
Originally committed as revision 20004 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/id3v2.c
patch
|
blob
|
history
diff --git
a/libavformat/id3v2.c
b/libavformat/id3v2.c
index
0cf2cb1
..
8070a4a
100644
(file)
--- a/
libavformat/id3v2.c
+++ b/
libavformat/id3v2.c
@@
-92,9
+92,9
@@
static void read_ttag(AVFormatContext *s, int taglen, const char *key)
case 0: /* ISO-8859-1 (0 - 255 maps directly into unicode) */
q = dst;
- while (taglen--) {
+ while (taglen--
&& q - dst < dstlen - 7
) {
uint8_t tmp;
- PUT_UTF8(get_byte(s->pb), tmp,
if (q - dst < dstlen - 1)
*q++ = tmp;)
+ PUT_UTF8(get_byte(s->pb), tmp, *q++ = tmp;)
}
*q = '\0';
break;