You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avdevice/opengl_enc: check sscanf return value
This commit is contained in:
@@ -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 &&
|
||||||
|
Reference in New Issue
Block a user