mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
return error if malloc fails
Originally committed as revision 12262 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
dbb7cbf26e
commit
2f4568e525
@ -255,6 +255,8 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
|||||||
len += 1;
|
len += 1;
|
||||||
if (type == 2) { // absolute path
|
if (type == 2) { // absolute path
|
||||||
dref->path = av_mallocz(len+1);
|
dref->path = av_mallocz(len+1);
|
||||||
|
if (!dref->path)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
get_buffer(pb, dref->path, len);
|
get_buffer(pb, dref->path, len);
|
||||||
if (len > volume_len && !strncmp(dref->path, volume, volume_len)) {
|
if (len > volume_len && !strncmp(dref->path, volume, volume_len)) {
|
||||||
len -= volume_len;
|
len -= volume_len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user