diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-05-22 20:05:53 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-05-22 20:08:55 +0200 |
commit | 557686ac6312ba59cc09fa023cf0f7a9f2c15a3f (patch) | |
tree | 9ddcdd0ff5d7349eabb2fe9cc1d6f09b27ba472b | |
parent | 86b252ea9dee18006910e30646ad1067f2d1323f (diff) | |
download | ffmpeg-557686ac6312ba59cc09fa023cf0f7a9f2c15a3f.tar.gz |
avdevice/opengl_enc: check sscanf return value
-rw-r--r-- | libavdevice/opengl_enc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index 06750bbba1..88c413ee63 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -594,7 +594,8 @@ static av_cold int opengl_read_limits(AVFormatContext *h) } 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++) { if (major < required_extensions[i].major && |