Page MenuHomeFreeBSD

D28301.diff
No OneTemporary

D28301.diff

diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c
--- a/usr.bin/elfctl/elfctl.c
+++ b/usr.bin/elfctl/elfctl.c
@@ -41,6 +41,7 @@
#include <getopt.h>
#include <libelf.h>
#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -249,13 +250,13 @@
if (i == len) {
if (isdigit(feature[0])) {
char *eptr;
- long val;
+ unsigned long long val;
errno = 0;
- val = strtol(feature, &eptr, 0);
+ val = strtoll(feature, &eptr, 0);
if (eptr == feature || *eptr != '\0')
errno = EINVAL;
- else if (val > UINT_MAX)
+ else if (val > UINT32_MAX)
errno = ERANGE;
if (errno != 0) {
warn("%s invalid", feature);

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 19, 8:33 AM (18 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27722829
Default Alt Text
D28301.diff (724 B)

Event Timeline