mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 16:30:53 -05:00
Fix regression issue after r267961. Handle special string case for
SYSCTLs like previously. MFC after: 2 weeks Reported by: several people
This commit is contained in:
parent
af3b2549c4
commit
6a3287f889
1 changed files with 5 additions and 2 deletions
|
|
@ -1210,9 +1210,12 @@ sysctl_handle_string(SYSCTL_HANDLER_ARGS)
|
|||
size_t outlen;
|
||||
int error = 0;
|
||||
|
||||
/* check for zero-length buffer */
|
||||
/*
|
||||
* A zero-length buffer indicates a fixed size read-only
|
||||
* string:
|
||||
*/
|
||||
if (arg2 == 0)
|
||||
return (ENOMEM);
|
||||
arg2 = strlen((char *)arg1) + 1;
|
||||
|
||||
if (req->oldptr != NULL) {
|
||||
char *tmparg;
|
||||
|
|
|
|||
Loading…
Reference in a new issue