aboutsummaryrefslogtreecommitdiff
path: root/security/openvpn-auth-ldap
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2015-01-19 20:36:42 +0000
committerMatthias Andree <mandree@FreeBSD.org>2015-01-19 20:36:42 +0000
commit9d0ba195015a73700612229c110bd8282f463ead (patch)
tree45a4d6e265276a0877aa712ad1c5bc1731f02720 /security/openvpn-auth-ldap
parent0dff9e6c894f7ec04be673cf259382ebd29e1d64 (diff)
Fix crash when configuration file is not EOL-terminated.
Notes
Notes: svn path=/head/; revision=377474
Diffstat (limited to 'security/openvpn-auth-ldap')
-rw-r--r--security/openvpn-auth-ldap/files/patch-src_TRConfigLexer.re22
1 files changed, 22 insertions, 0 deletions
diff --git a/security/openvpn-auth-ldap/files/patch-src_TRConfigLexer.re b/security/openvpn-auth-ldap/files/patch-src_TRConfigLexer.re
new file mode 100644
index 000000000000..9b64135422d5
--- /dev/null
+++ b/security/openvpn-auth-ldap/files/patch-src_TRConfigLexer.re
@@ -0,0 +1,22 @@
+--- src/TRConfigLexer.re.orig 2012-03-03 19:17:45 UTC
++++ src/TRConfigLexer.re
+@@ -72,7 +72,7 @@
+ #define SC(cond) LEXER_SC_ ## cond: LEXER_SC_ ## cond
+
+ /* Check for end-of-input */
+-#define CHECK_EOI() if (_eoi) { return NULL; }
++#define CHECK_EOI() if (_cursor >= _limit) { return NULL; }
+
+ /* Skip a token */
+ #define SKIP(cond) CHECK_EOI(); goto LEXER_SC_ ## cond
+@@ -115,10 +115,6 @@
+ - (void) fill: (int) length {
+ /* We just need to prevent re2c from walking off the end of our buffer */
+ assert(_limit - _cursor >= 0);
+- if (_cursor == _limit) {
+- /* Save the cursor and signal EOI */
+- _eoi = _cursor;
+- }
+ }
+
+ - (TRConfigToken *) scan {