summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-05-18 14:51:36 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-05-18 14:51:36 +0200
commite521150b8f6bed678527da1cf96e75026b86fe4f (patch)
treedd0799a78441581d714a8ce735a9b7142480bd63
parent5a9169e152779ac6f99e2eccb79a2a2f6e2c76b2 (diff)
Fix VPN-RD parsing on 32-bit systems
When shift count >= width of type the behavior is undefined.
-rw-r--r--conf/cf-lex.l6
1 files changed, 4 insertions, 2 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l
index a0e3c275..a24f5ad7 100644
--- a/conf/cf-lex.l
+++ b/conf/cf-lex.l
@@ -124,7 +124,8 @@ include ^{WHITE}*include{WHITE}*\".*\"{WHITE}*;
}
{DIGIT}+:{DIGIT}+ {
- unsigned long int l, len1 UNUSED, len2;
+ uint len1 UNUSED, len2;
+ u64 l;
char *e;
errno = 0;
@@ -155,7 +156,8 @@ include ^{WHITE}*include{WHITE}*\".*\"{WHITE}*;
}
[02]:{DIGIT}+:{DIGIT}+ {
- unsigned long int l, len1, len2;
+ uint len1, len2;
+ u64 l;
char *e;
if (yytext[0] == '0')