]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/options.c
pppd: Make sure word read from options file is null-terminated
[ppp.git] / pppd / options.c
index 5e1489f495779d9e58a481f5177ecda66c9166b5..f1d2dc9ddf36947df03d864c47241a6bb34def32 100644 (file)
@@ -1357,6 +1357,7 @@ getword(f, word, newlinep, filename)
 
        c = getc(f);
     }
+    word[MAXWORDLEN-1] = 0;    /* make sure word is null-terminated */
 
     /*
      * End of the word: check for errors.