Commit 1e8e0a32 authored by Zbigniew Jędrzejewski-Szmek's avatar Zbigniew Jędrzejewski-Szmek
Browse files

udev/ata_id: zero out variable properly

b8a2b0f7 'use initalization instead of explicit zeroing'
introduced a bug where only the first sizeof(uint_t*) bytes
would be zeroed out, instead of the whole array.
parent e9b807c1
......@@ -334,11 +334,10 @@ static int disk_identify(struct udev *udev,
int peripheral_device_type;
int all_nul_bytes;
int n;
int is_packet_device;
int is_packet_device = 0;
/* init results */
is_packet_device = 0;
memzero(out_identify, 512);
/* If we were to use ATA PASS_THROUGH (12) on an ATAPI device
* we could accidentally blank media. This is because MMC's BLANK
......@@ -402,7 +401,7 @@ static int disk_identify(struct udev *udev,
if (out_is_packet_device != NULL)
*out_is_packet_device = is_packet_device;
*out_is_packet_device = is_packet_device;
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment