Revision 787f8fad libavformat/id3v2.c

View differences:

libavformat/id3v2.c
92 92

  
93 93
    case 0:  /* ISO-8859-1 (0 - 255 maps directly into unicode) */
94 94
        q = dst;
95
        while (taglen--) {
95
        while (taglen-- && q - dst < dstlen - 7) {
96 96
            uint8_t tmp;
97
            PUT_UTF8(get_byte(s->pb), tmp, if (q - dst < dstlen - 1) *q++ = tmp;)
97
            PUT_UTF8(get_byte(s->pb), tmp, *q++ = tmp;)
98 98
        }
99 99
        *q = '\0';
100 100
        break;

Also available in: Unified diff