wpp: Check for overflows when parsing integer constants.
Alexandre Julliard
julliard at winehq.org
Sat Oct 18 13:23:56 CDT 2008
"Rob Shearman" <robertshearman at gmail.com> writes:
> diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l
> index 3e84a2e..829ac35 100644
> --- a/libs/wpp/ppl.l
> +++ b/libs/wpp/ppl.l
> @@ -163,6 +163,9 @@ ul [uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL]
> #include <string.h>
> #include <ctype.h>
> #include <assert.h>
> +#define __USE_ISOC99
> +#include <limits.h>
> +#undef __USE_ISOC99
If you have to do that sort of thing it means you are using non-portable
definitions. The right way is to provide them yourself if they are
missing, not to rely on the system headers supporting C99.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list