mirror of
git://github.com/lxc/lxc
synced 2025-08-31 21:15:17 +00:00
confile: use correct check for too large network lists
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32558 Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
@@ -5202,7 +5202,7 @@ static struct lxc_config_t *get_network_config_ops(const char *key,
|
||||
* better safe than sorry.
|
||||
* (Checking for INT_MAX here is intentional.)
|
||||
*/
|
||||
if (tmpidx == INT_MAX)
|
||||
if (tmpidx >= INT_MAX)
|
||||
return log_error_errno(NULL, ERANGE, "Number of configured networks would overflow the counter");
|
||||
*idx = tmpidx;
|
||||
|
||||
|
Reference in New Issue
Block a user