Magnus Olsen wrote:
HI Malloc(0) did not reaturn NULL; that was the fix for. I am reading the IEEE spec how malloc should work, and it exists two diffent implement of it. and some exprenet on diffent windows platfrom show diffent behvior about malloc(0)
IEEE specs really have nothing to do with how Windows behaves. Windows NEVER follow standards. A quick test on Win XP shows malloc(0) return a pointer to stack, so MSDN is right (surprise!) and your fix is wrong. If some older version of Windows did otherwise, this is a job for a compability framework (which we dont have).