Browse Source

xcbgrab: Check av_strdup() allocation

Bug-Id: CID 1274038
tags/n2.7
Vittorio Giovara 11 years ago
parent
commit
edca1dd552
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavdevice/xcbgrab.c

+ 2
- 0
libavdevice/xcbgrab.c 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';
}



Loading…
Cancel
Save