diff options
Diffstat (limited to 'src/gui/painting/qgrayraster.c')
-rw-r--r-- | src/gui/painting/qgrayraster.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c index c41b040..7a7adcf 100644 --- a/src/gui/painting/qgrayraster.c +++ b/src/gui/painting/qgrayraster.c @@ -160,7 +160,12 @@ #include <private/qrasterdefs_p.h> #include <private/qgrayraster_p.h> +// Bug in stdlib.h, see more information from fixed_stdlib.h +#if (defined __SYMBIAN32__ && !defined __cplusplus) +#include <fixed_stdlib.h> +#else #include <stdlib.h> +#endif // defined __SYMBIAN32__ && !defined __cplusplus #include <stdio.h> /* This macro is used to indicate that a function parameter is unused. */ @@ -1877,6 +1882,10 @@ if (memory) fprintf(stderr, "gray_raster_new(), memory ignored"); memory = malloc(sizeof(TRaster)); + if (!memory) { + *araster = 0; + return ErrRaster_Memory_Overflow; + } QT_FT_MEM_ZERO(memory, sizeof(TRaster)); *araster = (QT_FT_Raster) memory; |