]> git.ipfire.org Git - thirdparty/mdadm.git/commit - util.c
Avoid stack overflow if GPT partition entries on disk are > 128 bytes
authorJes Sorensen <Jes.Sorensen@redhat.com>
Sun, 30 Oct 2011 23:24:55 +0000 (10:24 +1100)
committerNeilBrown <neilb@suse.de>
Sun, 30 Oct 2011 23:24:55 +0000 (10:24 +1100)
commitdb7fdfe422a7d280b1fae999cb72b20b0e58756c
tree8393e0581720258db856ec228aeaee7791578cad
parent9ad6f6e65a535f77f180e87393043a8ffcfb30d8
Avoid stack overflow if GPT partition entries on disk are > 128 bytes

Per [1] GPT partition table entries are not guaranteed to be 128
bytes, in which case read() straight into a struct GPT_part_entry
would result in a buffer overflow corrupting the stack.

[1] http://en.wikipedia.org/wiki/GUID_Partition_Table

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
util.c