user_shaders: reject nonsense COMPONENTS values
negative values in specific causes out of bound accesses.
This commit is contained in:
1 parent
021b5ccf23
commit
1bf50fc71c
1 file changed
+4
@@ -266,6 +266,10 @@ static bool parse_hook(struct mp_log *log, struct bstr *body,
|
||||
mp_err(log, "Error while parsing COMPONENTS!\n");
|
||||
return false;
|
||||
}
|
||||
if (out->components < 0 || out->components > 4) {
|
||||
mp_err(log, "Invalid COMPONENTS: %d\n", out->components);
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user