File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,20 @@ class BottleRoutePointToExtension extends PointsToExtension {
128128
129129/* Python 3.6+ regex module constants */
130130
131+ string short_flag ( string flag ) {
132+ ( flag = "ASCII" or
133+ flag = "IGNORECASE" or
134+ flag = "LOCALE" or
135+ flag = "UNICODE" or
136+ flag = "MULTILINE" or
137+ flag = "TEMPLATE" )
138+ and result = flag .prefix ( 1 )
139+ or
140+ flag = "DOTALL" and result = "S"
141+ or
142+ flag = "VERBOSE" and result = "X"
143+ }
144+
131145class ReModulePointToExtension extends PointsToExtension {
132146
133147 string name ;
@@ -139,9 +153,10 @@ class ReModulePointToExtension extends PointsToExtension {
139153 }
140154
141155 override predicate pointsTo ( Context context , ObjectInternal value , ControlFlowNode origin ) {
142- exists ( ModuleObjectInternal sre_constants , CfgOrigin orig |
156+ exists ( ModuleObjectInternal sre_constants , CfgOrigin orig , string flag |
157+ ( name = flag or name = short_flag ( flag ) ) and
143158 sre_constants .getName ( ) = "sre_constants" and
144- sre_constants .attribute ( "SRE_FLAG_" + name , value , orig ) and
159+ sre_constants .attribute ( "SRE_FLAG_" + flag , value , orig ) and
145160 origin = orig .asCfgNodeOrHere ( this )
146161 )
147162 and pointsTo_helper ( context )
Original file line number Diff line number Diff line change 77| 50 | VERBOSE |
88| 51 | UNICODE |
99| 52 | UNICODE |
10+ | 64 | MULTILINE |
Original file line number Diff line number Diff line change 6060
6161#Misparsed on LGTM
6262re .compile (r"\[(?P<txt>[^[]*)\]\((?P<uri>[^)]*)" )
63+
64+ re .compile ("" , re .M ) # ODASA-8056
You can’t perform that action at this time.
0 commit comments