20 Jun
2006
20 Jun
'06
01:14
Hi, On Tuesday 20 June 2006 04:51, Anders Johansson wrote:
On Monday 19 June 2006 21:21, Jerry Feldman wrote:
This is a segfault waiting to happen. What happens if calloc(3) returns NULL? Always test the return values of malloc(3) and derivatives for NULL, otherwise there will be a point where the program will blow up.
Very true. I wasn't really looking at that, I was more concerned with the unseemly use of pointer indirection elsewhere. If I was to really rewrite it I would do a lot more
I agree, The example does not test the return value of calloc, as I didn't expect this small example to fail. -- Regards, Verdi