mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
C++: Use model interfaces in SafeExternalAPIFunction and make the three previosuly-used implementation models private.
This commit is contained in:
@@ -13,9 +13,7 @@ abstract class SafeExternalAPIFunction extends Function { }
|
||||
/** The default set of "safe" external APIs. */
|
||||
private class DefaultSafeExternalAPIFunction extends SafeExternalAPIFunction {
|
||||
DefaultSafeExternalAPIFunction() {
|
||||
// implementation note: this should be based on the properties of public interfaces, rather than accessing implementation classes directly. When we've done that, the three classes referenced here should be made fully private.
|
||||
this instanceof PureStrFunction or
|
||||
this instanceof StrLenFunction or
|
||||
this instanceof PureMemFunction
|
||||
this instanceof ArrayFunction and
|
||||
not this.(ArrayFunction).hasArrayOutput(_)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,7 @@ abstract class SafeExternalAPIFunction extends Function { }
|
||||
/** The default set of "safe" external APIs. */
|
||||
private class DefaultSafeExternalAPIFunction extends SafeExternalAPIFunction {
|
||||
DefaultSafeExternalAPIFunction() {
|
||||
// implementation note: this should be based on the properties of public interfaces, rather than accessing implementation classes directly. When we've done that, the three classes referenced here should be made fully private.
|
||||
this instanceof PureStrFunction or
|
||||
this instanceof StrLenFunction or
|
||||
this instanceof PureMemFunction
|
||||
this instanceof ArrayFunction and
|
||||
not this.(ArrayFunction).hasArrayOutput(_)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user