mirror of
https://github.com/simh/simh.git
synced 2026-01-11 23:52:58 +00:00
SOCK: Properly NUL terminate CIDR ACL check string while parsing
This commit is contained in:
parent
f4f302982e
commit
6d11ae4e6d
@ -678,7 +678,7 @@ if (c != NULL) {
|
||||
if ((c - validate_addr) > sizeof (v_cpy) - 1)
|
||||
return status;
|
||||
memcpy (v_cpy, validate_addr, c - validate_addr); /* Copy everything before the / */
|
||||
v_cpy[1 + c - validate_addr] = '\0'; /* NUL terminate the result */
|
||||
v_cpy[c - validate_addr] = '\0'; /* NUL terminate the result */
|
||||
validate_addr = v_cpy; /* Use the original string minus the prefix specifier */
|
||||
}
|
||||
if (p_getaddrinfo(validate_addr, NULL, NULL, &ai_validate))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user