Lines 867-875
Link Here
|
867 |
void *malloc_(size_t size) |
867 |
void *malloc_(size_t size) |
868 |
{ |
868 |
{ |
869 |
#undef malloc |
869 |
#undef malloc |
870 |
/* If we don't add an amount here the glibc memset seems to write |
870 |
return malloc(size); |
871 |
one byte over. */ |
|
|
872 |
return malloc(size+16); |
873 |
#define malloc(s) __ERROR_DONT_USE_MALLOC_DIRECTLY |
871 |
#define malloc(s) __ERROR_DONT_USE_MALLOC_DIRECTLY |
874 |
} |
872 |
} |
875 |
|
873 |
|
Lines 880-888
Link Here
|
880 |
static void *calloc_(size_t count, size_t size) |
878 |
static void *calloc_(size_t count, size_t size) |
881 |
{ |
879 |
{ |
882 |
#undef calloc |
880 |
#undef calloc |
883 |
/* If we don't add an amount here the glibc memset seems to write |
881 |
return calloc(count, size); |
884 |
one byte over. */ |
|
|
885 |
return calloc(count+1, size); |
886 |
#define calloc(n,s) __ERROR_DONT_USE_CALLOC_DIRECTLY |
882 |
#define calloc(n,s) __ERROR_DONT_USE_CALLOC_DIRECTLY |
887 |
} |
883 |
} |
888 |
|
884 |
|
Lines 893-901
Link Here
|
893 |
static void *realloc_(void *ptr, size_t size) |
889 |
static void *realloc_(void *ptr, size_t size) |
894 |
{ |
890 |
{ |
895 |
#undef realloc |
891 |
#undef realloc |
896 |
/* If we don't add an amount here the glibc memset seems to write |
892 |
return realloc(ptr, size); |
897 |
one byte over. */ |
|
|
898 |
return realloc(ptr, size+16); |
899 |
#define realloc(p,s) __ERROR_DONT_USE_RELLOC_DIRECTLY |
893 |
#define realloc(p,s) __ERROR_DONT_USE_RELLOC_DIRECTLY |
900 |
} |
894 |
} |
901 |
|
895 |
|