1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

xcbgrab: Check av_strdup() allocation

Bug-Id: CID 1274038
This commit is contained in:
Vittorio Giovara 2015-03-11 19:25:01 +00:00
parent 17c45d4d05
commit edca1dd552

View File

@ -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';
}