mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
BUG/MINOR: server: risk of over reading the pref_net array.
dns_option struct pref_net field is an array of 5. The issue here shows that pref_net_nb can go up to 5 as well which might lead to read outside of this array.
This commit is contained in:
parent
8a32106fff
commit
d10025c671
@ -1116,7 +1116,7 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
|
||||
e = p;
|
||||
while (*p != '\0') {
|
||||
/* If no room avalaible, return error. */
|
||||
if (opt->pref_net_nb > SRV_MAX_PREF_NET) {
|
||||
if (opt->pref_net_nb >= SRV_MAX_PREF_NET) {
|
||||
Alert("parsing [%s:%d]: '%s' exceed %d networks.\n",
|
||||
file, linenum, args[cur_arg], SRV_MAX_PREF_NET);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
|
Loading…
Reference in New Issue
Block a user