linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sizeof *data, when data isn't initalized, is that right?
@ 2015-01-22 18:19 Daniel Hilst Selli
  2015-01-22 18:38 ` Hubert CHAUMETTE
  2015-01-22 18:39 ` Hubert CHAUMETTE
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Hilst Selli @ 2015-01-22 18:19 UTC (permalink / raw)
  To: linux-c-programming@vger.kernel.org

I came across this code:

         struct mcp23s08_driver_data     *data;
	...
	data = kzalloc(sizeof *data + chips * sizeof(struct mcp23s08),
                         GFP_KERNEL);


Since data wasn't initialized when `sizeof *data' is called, wasn't this a non-initialized pointer dereference?

Cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-23  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-22 18:19 sizeof *data, when data isn't initalized, is that right? Daniel Hilst Selli
2015-01-22 18:38 ` Hubert CHAUMETTE
2015-01-22 18:39 ` Hubert CHAUMETTE
2015-01-23  7:33   ` Trevor Woerner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).