FreeBSD Bugzilla – Attachment 146248 Details for
Bug 192971
[PATCH]Some utilies might lead to overflow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Sysctl patch
patch-sysctl.txt (text/plain), 1.66 KB, created by
David CARLIER
on 2014-08-25 10:26:05 UTC
(
hide
)
Description:
Sysctl patch
Filename:
MIME Type:
Creator:
David CARLIER
Created:
2014-08-25 10:26:05 UTC
Size:
1.66 KB
patch
obsolete
>Index: sysctl.c >=================================================================== >--- sysctl.c (revision 270521) >+++ sysctl.c (working copy) >@@ -296,7 +296,7 @@ > } else { > intval = (int)strtol(newval, &endptr, > 0); >- if (endptr == newval || *endptr != '\0') { >+ if (errno == ERANGE || endptr == newval || *endptr != '\0') { > warnx("invalid integer '%s'%s", > (char *)newval, line); > return (1); >@@ -307,7 +307,7 @@ > break; > case CTLTYPE_UINT: > uintval = (int) strtoul(newval, &endptr, 0); >- if (endptr == newval || *endptr != '\0') { >+ if (errno == ERANGE || endptr == newval || *endptr != '\0') { > warnx("invalid unsigned integer '%s'%s", > (char *)newval, line); > return (1); >@@ -317,7 +317,7 @@ > break; > case CTLTYPE_LONG: > longval = strtol(newval, &endptr, 0); >- if (endptr == newval || *endptr != '\0') { >+ if (errno == ERANGE || endptr == newval || *endptr != '\0') { > warnx("invalid long integer '%s'%s", > (char *)newval, line); > return (1); >@@ -327,7 +327,7 @@ > break; > case CTLTYPE_ULONG: > ulongval = strtoul(newval, &endptr, 0); >- if (endptr == newval || *endptr != '\0') { >+ if (errno == ERANGE || endptr == newval || *endptr != '\0') { > warnx("invalid unsigned long integer" > " '%s'%s", (char *)newval, line); > return (1); >@@ -349,7 +349,7 @@ > break; > case CTLTYPE_U64: > u64val = strtoumax(newval, &endptr, 0); >- if (endptr == newval || *endptr != '\0') { >+ if (errno == ERANGE || endptr == newval || *endptr != '\0') { > warnx("invalid uint64_t '%s'%s", > (char *)newval, line); > return (1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 192971
:
146223
| 146248