summaryrefslogtreecommitdiffstats
path: root/patches/source/ppp/ppp.CVE-2014-3158.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source/ppp/ppp.CVE-2014-3158.diff')
-rw-r--r--patches/source/ppp/ppp.CVE-2014-3158.diff30
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/source/ppp/ppp.CVE-2014-3158.diff b/patches/source/ppp/ppp.CVE-2014-3158.diff
new file mode 100644
index 00000000..500ca18e
--- /dev/null
+++ b/patches/source/ppp/ppp.CVE-2014-3158.diff
@@ -0,0 +1,30 @@
+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);
+ }