[Png-mng-security] potential optimizing away of initialization loop
glennrp at comcast.net
glennrp at comcast.net
Thu Feb 5 00:09:51 UTC 2009
SECURITY SENSITIVE
I seem to recall in the past having trouble with optimizing
compilers removing loops that apparently don't really do
anything. In this bugfix we introduce the first loop in
for (i=0; i<n; i++)
element[i] = NULL;
for (i=0; i<n; i++)
element[i] = png_malloc(...);
I think the presence of the call to an external function
i.e., png_malloc() in the second loop will prevent the first
loop from being optimized away. Is that correct, and
therefore we should not worry about it?
Glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/png-mng-security-archive/attachments/20090205/787196d2/attachment.html>
More information about the png-mng-security-archive
mailing list