Browse Source

ff_flac_parse_picture: assert that len is within the array

The check that gurantees this isnt recognized by coverity for
example

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 11 years ago
parent
commit
731f7eaaad
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/flacdec_picture.c

+ 2
- 0
libavformat/flacdec_picture.c View File

@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "libavutil/avassert.h"
#include "avformat.h"
#include "flacdec.h"
#include "id3v2.h"
@@ -59,6 +60,7 @@ int ff_flac_parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)
ret = AVERROR_INVALIDDATA;
goto fail;
}
av_assert0(len < sizeof(mimetype));
mimetype[len] = 0;

while (mime->id != AV_CODEC_ID_NONE) {


Loading…
Cancel
Save