Revision: 967
http://freeassociation.svn.sourceforge.net/freeassociation/?rev=967&view=rev
Author: artcancro
Date: 2009-09-16 02:41:00 +0000 (Wed, 16 Sep 2009)
Log Message:
-----------
From: Patrick Ohly <patrick.ohly@...>
On 64 bit, ending a varargs list as in icalcomponent_vanew()
with 0 puts a 32 bit integer on the stack, not a 64 bit pointer.
The implementation then reads 64 bits and thus undefined memory.
The 'regression' test program crashed because of that.
This patch replaces 0 with (void *)0. It puts commas
and closing bracket directly after the value, for
consistency reasons. It's very likely that some calls
were missed, but at least the test now passes without
valgrind complaints.
Note that NULL is intentionally *not* used. In C, it may
or may not be defined as (void *)0. In C++, it definitely
is just a plain 0.
Modified Paths:
--------------
trunk/libical/src/test/regression-component.c
trunk/libical/src/test/regression.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|