]> git.ipfire.org Git - thirdparty/mdadm.git/commit
mdadm: fix a buffer overflow
authorSong Liu <songliubraving@fb.com>
Thu, 8 Sep 2016 18:21:07 +0000 (11:21 -0700)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 12 Sep 2016 16:51:12 +0000 (12:51 -0400)
commit474267015b492308d5f410e3568c6cb3d370c688
tree6d497dfb035898fb436c8722fc66a721ca060278
parentbd1fd72e13652416da4c646ea47549fcfdf49b26
mdadm: fix a buffer overflow

struct mdp_superblock_1.set_name is 32B long, but struct mdinfo.name
is 33B long. So we need strncpy instead strcpy to avoid buffer
overflow.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
super1.c