The variable len can get a negative return value from cvtnum,
which we check for, but which is impossible with the current
unsigned variable type. Currently the if(len < 0) check is
pointless. This patch fixes that.
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
for (i = 0; i < nr_iov; i++) {
char *arg = argv[i];
- uint64_t len;
+ int64_t len;
len = cvtnum(arg);
if (len < 0) {
}
/* should be SIZE_T_MAX, but that doesn't exist */
- if (len > UINT_MAX) {
+ if (len > INT_MAX) {
printf("too large length argument -- %s\n", arg);
goto fail;
}