Commit edca1dd5 authored by Vittorio Giovara's avatar Vittorio Giovara

xcbgrab: Check av_strdup() allocation

Bug-Id: CID 1274038
parent 17c45d4d
......@@ -602,6 +602,8 @@ static av_cold int xcbgrab_read_header(AVFormatContext *s)
if (opts) {
sscanf(opts, "%d,%d", &c->x, &c->y);
host = av_strdup(s->filename);
if (!host)
return AVERROR(ENOMEM);
host[opts - s->filename] = '\0';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment