diff options
Diffstat (limited to 'libavformat/apetag.c')
-rw-r--r-- | libavformat/apetag.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/apetag.c b/libavformat/apetag.c index 7656555125..4d0b8acf08 100644 --- a/libavformat/apetag.c +++ b/libavformat/apetag.c @@ -75,6 +75,10 @@ static int ape_tag_read_field(AVFormatContext *s) if (!value) return AVERROR(ENOMEM); c = avio_read(pb, value, size); + if (c < 0) { + av_free(value); + return c; + } value[c] = 0; av_dict_set(&s->metadata, key, value, AV_DICT_DONT_STRDUP_VAL); } |