Initialize vecp in send anno()
authorPhilipp Takacs <philipp@bureaucracy.de>
Sat, 17 Jan 2015 01:00:22 +0000 (02:00 +0100)
committerPhilipp Takacs <philipp@bureaucracy.de>
Sat, 17 Jan 2015 01:00:22 +0000 (02:00 +0100)
Access to an uninialized variable can cause
a a buffer overflow or underrun.
(Thanks to the compiler for reporting.)

uip/send.c

index b85963d..ed6b08d 100644 (file)
@@ -678,7 +678,7 @@ anno(struct stat *st)
        char *msgs, *folder;
        char buf[BUFSIZ];
        char *vec[MAXARGS];
-       int vecp;
+       int vecp = 0;
        char *cp, *dp;
 
        if (altmsg && (stat(altmsg, &st2) == NOTOK ||