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
@ -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 New Issue
Block a user