This patch should work, but I dont understand, why use
malloc if you are assuming alocated memory is set to 0
(malloc doesn't do that, calloc does), you should use
calloc. So besides the fix proposed by this patch, there is
another way to do it, it is to use calloc instead of malloc,
all you have to do is replace every occurence
malloc(
with:
calloc( 1,
And the assumption made (allocated memory is set to zero)
would be correct.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
app_callingcard.c patch
Logged In: YES
user_id=7500
This patch should work, but I dont understand, why use
malloc if you are assuming alocated memory is set to 0
(malloc doesn't do that, calloc does), you should use
calloc. So besides the fix proposed by this patch, there is
another way to do it, it is to use calloc instead of malloc,
all you have to do is replace every occurence
malloc(
with:
calloc( 1,
And the assumption made (allocated memory is set to zero)
would be correct.