X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Foptions.c;h=e9042d1f64e2b5bbf05c74a91587f049f011c2b8;hp=45fa742cd9ce9d095490ebc68fa199023f8da8cc;hb=7658e8257183f062dc01f87969c140707c7e52cb;hpb=880a81be7c8e0fe8567227bc17a1bff3ea035943 diff --git a/pppd/options.c b/pppd/options.c index 45fa742..e9042d1 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -1289,9 +1289,10 @@ getword(f, word, newlinep, filename) /* * Store the resulting character for the escape sequence. */ - if (len < MAXWORDLEN-1) + if (len < MAXWORDLEN) { word[len] = value; - ++len; + ++len; + } if (!got) c = getc(f); @@ -1329,9 +1330,10 @@ getword(f, word, newlinep, filename) /* * An ordinary character: store it in the word and get another. */ - if (len < MAXWORDLEN-1) + if (len < MAXWORDLEN) { word[len] = c; - ++len; + ++len; + } c = getc(f); }