Browse Source

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  compat: msvc: Make sure the object files are included when linking statically
  id3v2: check for end of file while unescaping tags

Conflicts:
	configure
	libavformat/id3v2.c

Note, ffmpeg is not affected by the out of buffer write bug

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.0
Michael Niedermayer 12 years ago
parent
commit
760f7d3a90
2 changed files with 9 additions and 2 deletions
  1. +5
    -0
      configure
  2. +4
    -2
      libavformat/id3v2.c

+ 5
- 0
configure View File

@@ -4614,6 +4614,11 @@ if enabled yasm; then
printf '' >$TMPASM printf '' >$TMPASM
fi 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 mkdir -p doc
echo "@c auto-generated by configure" > doc/config.texi echo "@c auto-generated by configure" > doc/config.texi




+ 4
- 2
libavformat/id3v2.c View File

@@ -720,9 +720,11 @@ static void id3v2_parse(AVFormatContext *s, int len, uint8_t version,
uint8_t *b; uint8_t *b;


b = buffer; 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); *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); uint8_t val = avio_r8(s->pb);
*b++ = val ? val : avio_r8(s->pb); *b++ = val ? val : avio_r8(s->pb);
} }


Loading…
Cancel
Save