I think I will fix this by reducing/halving the max value allowed in
cfengine rather than changing the type, as this could have knockon
consequences.
Matt Richards wrote:
> Greetings.
>
> On AIX, there is a overflow in the syntax range checking sccanf. In
> syntax.c (CheckParseInt, as well as others functions in syntax.c):
>
> long max = CF_LOWINIT, min = CF_HIGHINIT, val;
>
> ...
> sscanf(split->name,"%ld",&max);
>
> The conversion overflows a long making it a negative number. Consider
> the test program as an example:
>
> long max;
> long long lmax;
>
> sscanf ("4026531839", "%lld", &lmax); // max range for mtime
> printf ("%lld\n", lmax);
>
>
> sscanf ("4026531839", "%ld", &max); // sscanf in syntax.c
> printf ("%ld\n", max);
>
>
> Output as follows:
> 4026531839
> -268435457
>
> Thanks,
> Matt
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Bug-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/bug-cfengine
--
Mark Burgess
-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway
Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine