• Andreas Rheinhardt's avatar
    avformat/flac_picture: Switch to bytestream2 API · 84a4261c
    Andreas Rheinhardt authored
    ff_flac_parse_picture() parses a buffer containing a flac metadata
    picture block by wrapping it in an AVIOContext and using the AVIOContext
    API. Consequently, when not enough data could be read AVERROR(EIO) was
    returned although reading didn't really fail: A block that contains a
    subfield whose size field indicates that it is so big as to extend
    beyond the buffer is just invalid.
    
    This commit changes this by using the bytestream2 API instead;
    furthermore, the checks for whether there is enough data left are
    performed before allocating a buffer for said data.
    
    Finally, if the length of the picture description is bigger than
    INT_MAX, it will now raise an error.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    84a4261c
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...