quagga: improve some strscy() calls
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 2 Jun 2016 18:57:50 +0000 (20:57 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 2 Jun 2016 20:06:48 +0000 (22:06 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/quagga/src/quagga.c

index a558bcf..313042a 100644 (file)
@@ -64,8 +64,8 @@ zebra_init(void)
 {
 
   memset(&zebra, 0, sizeof zebra);
-  zebra.sockpath = olsr_malloc(sizeof ZEBRA_SOCKPATH  + 1, "QUAGGA: New socket path");
-  strscpy(zebra.sockpath, ZEBRA_SOCKPATH, sizeof ZEBRA_SOCKPATH);
+  zebra.sockpath = olsr_malloc(sizeof (ZEBRA_SOCKPATH), "QUAGGA: New socket path");
+  strscpy(zebra.sockpath, ZEBRA_SOCKPATH, sizeof (ZEBRA_SOCKPATH));
 
 }