File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
cpp/ql/src/semmle/code/cpp/security Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,16 @@ string getASecureAlgorithmName() {
59
59
* contain an algorithm that is known to be secure.
60
60
*/
61
61
string getSecureAlgorithmRegex ( ) {
62
- // algorithms usually appear in names surrounded by characters that are not
63
- // alphabetical characters in the same case. This handles the upper and lower
64
- // case cases
65
- result = "(^|.*[^A-Z])" + getASecureAlgorithmName ( ) + "([^A-Z].*|$)"
66
- or
67
- // for lowercase, we want to be careful to avoid being confused by camelCase
68
- // hence we require two preceding uppercase letters to be sure of a case
69
- // switch, or a preceding non-alphabetic character
70
- result = "(^|.*[A-Z]{2}|.*[^a-zA-Z])" + getASecureAlgorithmName ( ) .toLowerCase ( ) + "([^a-z].*|$)"
62
+ result =
63
+ // algorithms usually appear in names surrounded by characters that are not
64
+ // alphabetical characters in the same case. This handles the upper and lower
65
+ // case cases
66
+ "(^|.*[^A-Z])(" + strictconcat ( getASecureAlgorithmName ( ) , "|" ) + ")([^A-Z].*|$)" + "|" +
67
+ // for lowercase, we want to be careful to avoid being confused by camelCase
68
+ // hence we require two preceding uppercase letters to be sure of a case
69
+ // switch, or a preceding non-alphabetic character
70
+ "(^|.*[A-Z]{2}|.*[^a-zA-Z])(" + strictconcat ( getASecureAlgorithmName ( ) .toLowerCase ( ) , "|" ) +
71
+ ")([^a-z].*|$)"
71
72
}
72
73
73
74
/**
You can’t perform that action at this time.
0 commit comments