id3v2: check for end of file while unescaping tags

Prevent a serious out of buffer bound write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
compat: msvc: Make sure the object files are included when linking statically

If building libav with -MD in the cflags (for making the MSVC compiler
generate code for using a dynamically linked libc), the system headers
that declare strtod, snprintf and vsnprintf declare the functions as
imported from a DLL. To hook up wrappers of our own for these functions,
the function names are defined to avpriv_*, so that the calling code
within libav calls the wrappers instead. Since these functions
are declared to be imported from DLLs, the calling code expects to
load them from DLL import function pointers (creating references to
_imp__avpriv_strtod instead of directly to avpriv_strtod). If the
libav libraries are not built as DLLs, no such function pointers (as
the calling code expects) are created.

The linker can fix this up automatically in some cases (producing
warnings LNK4217 and LNK4049), if the object files are already
included. By telling the linker to try to include those symbols
(without the _imp prefix as the calling code ends up using),
we get the object files included, so that the linker can do the
automatic fixup. This is done via config.h, so that all (or at least
most) of the object files in our libraries force including the compat
files, to make sure they are included regardless of what files from our
static libraries actually are included.

Signed-off-by: Martin Storsjö <martin@martin.st>
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>
lavfi/frei0r: fix crash when parameters are not set.
vc1dec: vc1_mc_4mv_chroma4: match addressing between compensation and MC

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vc1dec: Fix mixed field/frame intensity compensation

Fixes Ticket2523

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vc1dec: fix lutuv use in vc1_mc_4mv_chroma4()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>