Stack overflow in uev_trigger()
authorHannes Reinecke <hare@suse.de>
Fri, 27 Mar 2009 22:50:18 +0000 (23:50 +0100)
committerChristophe Varoqui <christophe.varoqui@free.fr>
Fri, 27 Mar 2009 22:50:18 +0000 (23:50 +0100)
uev_discard uses sscanf to write a 10 byte string into an array,
but I forgot to take the trailing NULL byte into account.

multipathd/main.c

index b7532f1..8a1a63d 100644 (file)
@@ -607,7 +607,7 @@ static int
 uev_discard(char * devpath)
 {
        char *tmp;
-       char a[10], b[10];
+       char a[11], b[11];
 
        /*
         * keep only block devices, discard partitions