mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
avdevice/opengl_enc: check sscanf return value
This commit is contained in:
parent
86b252ea9d
commit
557686ac63
@ -594,7 +594,8 @@ static av_cold int opengl_read_limits(AVFormatContext *h)
|
|||||||
}
|
}
|
||||||
|
|
||||||
av_log(h, AV_LOG_DEBUG, "OpenGL version: %s\n", version);
|
av_log(h, AV_LOG_DEBUG, "OpenGL version: %s\n", version);
|
||||||
sscanf(version, "%d.%d", &major, &minor);
|
if (sscanf(version, "%d.%d", &major, &minor) != 2)
|
||||||
|
return AVERROR(ENOSYS);
|
||||||
|
|
||||||
for (i = 0; required_extensions[i].extension; i++) {
|
for (i = 0; required_extensions[i].extension; i++) {
|
||||||
if (major < required_extensions[i].major &&
|
if (major < required_extensions[i].major &&
|
||||||
|
Loading…
Reference in New Issue
Block a user