From: Daniel Veillard Date: Fri, 19 Oct 2007 10:01:01 +0000 (+0000) Subject: * src/conf.c: fix bug on negative values in virConfParseLong() X-Git-Tag: LIBVIRT_0_4_1~317 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24abf6c925e656f0716ebb1394a6eee7ab1d7435;p=thirdparty%2Flibvirt.git * src/conf.c: fix bug on negative values in virConfParseLong() raised by Tatsuro Enokura Daniel --- diff --git a/ChangeLog b/ChangeLog index 81e5a6bf4b..5c52e6f7f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 19 11:59:39 CEST 2007 Daniel Veillard + + * src/conf.c: fix bug on negative values in virConfParseLong() + raised by Tatsuro Enokura + Fri Oct 19 10:24:52 CEST 2007 Daniel Veillard * src/conf.c: documentation cleanups from Jim Meyering diff --git a/src/conf.c b/src/conf.c index 3a637b2c59..635792c689 100644 --- a/src/conf.c +++ b/src/conf.c @@ -345,6 +345,8 @@ virConfParseLong(virConfParserCtxtPtr ctxt, long *val) l = l * 10 + (CUR - '0'); NEXT; } + if (neg) + l = -l; *val = l; return(0); }