diff --git a/configure b/configure index e78d1bad76..f646d55885 100755 --- a/configure +++ b/configure @@ -4614,6 +4614,11 @@ if enabled yasm; then printf '' >$TMPASM fi +if enabled msvc && ! enabled shared; then + echo '#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_strtod")' >> $TMPH + echo '#pragma comment(linker, "/include:"EXTERN_PREFIX"avpriv_snprintf")' >> $TMPH +fi + mkdir -p doc echo "@c auto-generated by configure" > doc/config.texi diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 46d579f466..3b02f95553 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -720,9 +720,11 @@ static void id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t *b; b = buffer; - while (avio_tell(s->pb) < end && b - buffer < tlen) { + while (avio_tell(s->pb) < end && b - buffer < tlen && !s->pb->eof_reached) { *b++ = avio_r8(s->pb); - if (*(b - 1) == 0xff && avio_tell(s->pb) < end - 1 && b - buffer < tlen) { + if (*(b - 1) == 0xff && avio_tell(s->pb) < end - 1 && + b - buffer < tlen && + !s->pb->eof_reached ) { uint8_t val = avio_r8(s->pb); *b++ = val ? val : avio_r8(s->pb); }