Closed GoogleCodeExporter closed 8 years ago
Please output sizeof(*ctx) and sizeof(ctx) and compare.
Original comment by valenok
on 2 Feb 2012 at 9:15
[deleted comment]
I did and the result is:
printf("%d : %d\n", sizeof(ctx), sizeof(*ctx)); -> 4 : 1288
Original comment by mingo...@gmail.com
on 2 Feb 2012 at 9:55
if we only allocate memory for a pinter we should not use it as it is done now:
ctx = (struct mg_context *) calloc(1, sizeof(*ctx));
ctx->user_callback = user_callback; <<<< writing to unallocated memory
ctx->user_data = user_data; <<<< writing to unallocated memory
This is done with mingw 4.6.2
Original comment by mingo...@gmail.com
on 2 Feb 2012 at 9:58
Original issue reported on code.google.com by
mingo...@gmail.com
on 2 Feb 2012 at 9:11