diff options
author | Daniel Stone <daniel@fooishbar.org> | 2004-09-15 15:47:39 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2004-09-15 15:47:39 +0000 |
commit | 19066719975d0dbfa51c6b413a3760ed7cf93ddc (patch) | |
tree | c757de7bbe7881acf219c1f4bf0b3459fbd8cd84 /src/XpmI.h | |
parent | 2773a7214e282f6f673483f5233b880505947c3f (diff) |
Merge patch from Mathieu Herrb to fix several integer overflows and otherXORG-6_8_1
security errors in libXpm.
Diffstat (limited to 'src/XpmI.h')
-rw-r--r-- | src/XpmI.h | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -86,6 +86,18 @@ extern FILE *popen(); boundCheckingCalloc((long)(nelem),(long) (elsize)) #endif +#if defined(SCO) || defined(__USLC__) +#include <stdint.h> /* For SIZE_MAX */ +#endif +#include <limits.h> +#ifndef SIZE_MAX +# ifdef ULONG_MAX +# define SIZE_MAX ULONG_MAX +# else +# define SIZE_MAX UINT_MAX +# endif +#endif + #define XPMMAXCMTLEN BUFSIZ typedef struct { unsigned int type; @@ -187,9 +199,9 @@ typedef struct _xpmHashAtom { } *xpmHashAtom; typedef struct { - int size; - int limit; - int used; + unsigned int size; + unsigned int limit; + unsigned int used; xpmHashAtom *atomTable; } xpmHashTable; |