[PATCH 02/19] Use calloc to zero fill buffers being allocated for replies & events

Alan Coopersmith alan.coopersmith at oracle.com
Mon Jul 2 19:19:53 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/ 2/12 10:13 AM, Keith Packard wrote:
> Alan Coopersmith <alan.coopersmith at oracle.com> writes:
> 
>> Ensures padding bytes are zero-filled
> 
> Yeah, we've wanted to do this for a long time for compression. Is this 
> really all of the replies allocated with malloc?

It's all the ones I found looking for malloc involving sizeof *Reply or
*Event structures.   There may be more out there that are harder to find.

Most replies are stack allocated, as you saw in the rest of the series.

- -- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (SunOS)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/yVskACgkQovueCB8tEw4mAwCfYeZTqivlqw9EyFUGpNMl9UZc
SIQAoIoEuIMPKcinHaFpsODyRpY8C4As
=XO0q
-----END PGP SIGNATURE-----


More information about the xorg-devel mailing list