mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 11:54:38 +01: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:
1 parent
af3b2549c4
commit
6a3287f889
1 file changed
+5
-2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=267993
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user