]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fix VPN-RD parsing on 32-bit systems
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 18 May 2017 12:51:36 +0000 (14:51 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 18 May 2017 12:51:36 +0000 (14:51 +0200)
When shift count >= width of type the behavior is undefined.

conf/cf-lex.l

index a0e3c27568f4add5a436a5c436d55d7f7d6aa839..a24f5ad73f56156254d0a4572d1d690e58b3e1c7 100644 (file)
@@ -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')