]> granicus.if.org Git - sudo/commitdiff
Make arg_size and arg_len unsigned since we do bitwise operations
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 16 Jul 2016 22:22:40 +0000 (16:22 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 16 Jul 2016 22:22:40 +0000 (16:22 -0600)
on them.

plugins/sudoers/toke_util.c

index e7bc37f01adc0cd41710c5be2cf0613c4724f76b..8140186219e797a07f5d45ee572d70f2ddeb6892 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1998-2005, 2007-2015
+ * Copyright (c) 1996, 1998-2005, 2007-2016
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -41,8 +41,8 @@
 #include "toke.h"
 #include <gram.h>
 
-static int arg_len = 0;
-static int arg_size = 0;
+static unsigned int arg_len = 0;
+static unsigned int arg_size = 0;
 
 bool
 fill_txt(const char *src, size_t len, size_t olen)
@@ -127,7 +127,7 @@ fill_cmnd(const char *src, size_t len)
 bool
 fill_args(const char *s, size_t len, int addspace)
 {
-    int new_len;
+    unsigned int new_len;
     char *p;
     debug_decl(fill_args, SUDOERS_DEBUG_PARSER)