xcbgrab: Check av_strdup() allocation
Bug-Id: CID 1274038
This commit is contained in:
parent
17c45d4d05
commit
edca1dd552
@ -602,6 +602,8 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
|
|||||||
if (opts) {
|
if (opts) {
|
||||||
sscanf(opts, "%d,%d", &c->x, &c->y);
|
sscanf(opts, "%d,%d", &c->x, &c->y);
|
||||||
host = av_strdup(s->filename);
|
host = av_strdup(s->filename);
|
||||||
|
if (!host)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
host[opts - s->filename] = '\0';
|
host[opts - s->filename] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user