Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fvbe.git;a=commitdiff;h=0be83da264f856427d5ef8e19743292f7ffa9e6a

commit 0be83da264f856427d5ef8e19743292f7ffa9e6a
Author: James Buren <[email protected]>
Date:   Fri May 10 20:07:11 2013 -0500

scanner: use patterns which also check text size

diff --git a/src/scanner.re b/src/scanner.re
index be6c7b8..3e98fea 100644
--- a/src/scanner.re
+++ b/src/scanner.re
@@ -53,8 +53,8 @@ YYDECLARE(
is_raid_device
,
/*!re2c
-  "md" digit+ null { return true;  }
-  any              { return false; }
+  "md" digit {1,3} null { return true;  }
+  any                   { return false; }
*/
,
YYSILENCE
@@ -75,8 +75,8 @@ YYDECLARE(
is_partition_name
,
/*!re2c
-  ascii+ null { return YYLENCHECK(PARTITION_NAME_MAX); }
-  any         { return false;                          }
+  ascii {0,36} null { return true;  }
+  any               { return false; }
*/
,
)
@@ -85,8 +85,8 @@ YYDECLARE(
is_user_name
,
/*!re2c
-  (lower|[_]) (lowerdigit|[_-])* [$]? null { return YYLENCHECK((ssize_t) 
USER_NAME_MAX); }
-  any                                      { return false;                     
          }
+  (lower|[_]) ((lowerdigit|[_-]) {0,31} | (lowerdigit|[_-]) {0,30} [$]) null { 
return true;  }
+  any                                                                        { 
return false; }
*/
,
)
@@ -95,9 +95,8 @@ YYDECLARE(
is_dns_label
,
/*!re2c
-  digit+ null                                                 { return false;  
                   }
-  (alphadigit | alphadigit (alphadigit|[-])* alphadigit) null { return 
YYLENCHECK(HOST_NAME_MAX); }
-  any                                                         { return false;  
                   }
+  (alphadigit | alphadigit (alphadigit|[-]) {0,62} alphadigit) null { return 
true;  }
+  any                                                               { return 
false; }
*/
,
)
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to