[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-167-g4319a8f

tkojm tkojm at 77e5149b-7576-45b1-b177-96237e5ba77b
Fri Jun 12 19:11:54 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit b1ea3aba6f745c954d0f90bcf78d7a84f1e51834
Author: tkojm <tkojm at 77e5149b-7576-45b1-b177-96237e5ba77b>
Date:   Tue May 5 13:33:11 2009 +0000

    shared/optparser.[ch]: properly handle large size values (bb#1583)
    
    
    git-svn-id: http://svn.clamav.net/svn/clamav-devel/trunk@5058 77e5149b-7576-45b1-b177-96237e5ba77b

diff --git a/ChangeLog b/ChangeLog
index 665b01c..b1f0ea0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue May  5 15:30:26 CEST 2009 (tk)
+----------------------------------
+ * shared/optparser.[ch]: properly handle large size values (bb#1583)
+
 Mon May  4 10:47:10 CEST 2009 (tk)
 ----------------------------------
  * freshclam/freshclam.c: handle --debug (bb#1590)
diff --git a/shared/optparser.c b/shared/optparser.c
index d7dd452..f3d085f 100644
--- a/shared/optparser.c
+++ b/shared/optparser.c
@@ -460,7 +460,7 @@ static void optprint(const struct optstruct *opts)
 }
 */
 
-static int optadd(struct optstruct **opts, struct optstruct **opts_last, const char *name, const char *cmd, const char *strarg, int numarg, int flags, int idx)
+static int optadd(struct optstruct **opts, struct optstruct **opts_last, const char *name, const char *cmd, const char *strarg, long long numarg, int flags, int idx)
 {
 	struct optstruct *newnode;
 
@@ -525,7 +525,7 @@ static int optadd(struct optstruct **opts, struct optstruct **opts_last, const c
     return 0;
 }
 
-static int optaddarg(struct optstruct *opts, const char *name, const char *strarg, int numarg)
+static int optaddarg(struct optstruct *opts, const char *name, const char *strarg, long long numarg)
 {
 	struct optstruct *pt, *h, *new;
 
@@ -631,13 +631,13 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo
 	const struct clam_option *optentry;
 	char *pt;
 	const char *name = NULL, *arg;
-	int i, err = 0, lc = 0, sc = 0, opt_index, line = 0, ret, numarg;
+	int i, err = 0, lc = 0, sc = 0, opt_index, line = 0, ret;
 	struct optstruct *opts = NULL, *opts_last = NULL, *opt;
 	char buffer[512], *buff;
 	struct option longopts[MAXCMDOPTS];
 	char shortopts[MAXCMDOPTS];
 	regex_t regex;
-	unsigned long int lnumarg;
+	long long numarg, lnumarg;
 	int regflags = REG_EXTENDED | REG_NOSUB;
 
 
@@ -952,7 +952,7 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo
 		    lnumarg = UINT_MAX;
 		}
 
-		numarg = (unsigned int)lnumarg;
+		numarg = lnumarg;
 		break;
 
 	    case TYPE_BOOL:
diff --git a/shared/optparser.h b/shared/optparser.h
index 3ecd68b..8709ec3 100644
--- a/shared/optparser.h
+++ b/shared/optparser.h
@@ -41,7 +41,7 @@ struct optstruct {
     char *name;
     char *cmd;
     char *strarg;
-    int numarg;
+    long long numarg;
     int enabled;
     int active;
     int flags;
@@ -58,7 +58,7 @@ struct clam_option {
     char shortopt;
     int argtype;
     const char *regex;
-    int numarg;
+    long long numarg;
     const char *strarg;
     int flags;
     int owner;

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list