still tracking blasted memory corruption bug.

This commit is contained in:
gardners 2012-04-20 17:12:21 +09:30
parent 5c52c8e274
commit 3059a5c3e9

View File

@ -359,7 +359,7 @@ void *_serval_debug_malloc(unsigned int bytes,char *file,const char *func,int li
void *_serval_debug_calloc(unsigned int bytes,unsigned int count,char *file,const char *func,int line) void *_serval_debug_calloc(unsigned int bytes,unsigned int count,char *file,const char *func,int line)
{ {
void *r=calloc(bytes+SDM_GUARD_AFTER,count); void *r=calloc((bytes*count)+SDM_GUARD_AFTER,1);
fprintf(stderr,"%s:%d:%s(): calloc(%d,%d) -> %p\n",file,line,func,bytes,count,r); fprintf(stderr,"%s:%d:%s(): calloc(%d,%d) -> %p\n",file,line,func,bytes,count,r);
return r; return r;
} }