@@ -74,9 +74,7 @@ private class StdStringConstructor extends Constructor, TaintFunction {
7474 * The `std::string` function `c_str`.
7575 */
7676private class StdStringCStr extends TaintFunction {
77- StdStringCStr ( ) {
78- this = any ( StdBasicString s ) .getAnInstMemberNamed ( "c_str" )
79- }
77+ StdStringCStr ( ) { this = any ( StdBasicString s ) .getAnInstMemberNamed ( "c_str" ) }
8078
8179 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
8280 // flow from string itself (qualifier) to return value
@@ -89,9 +87,7 @@ private class StdStringCStr extends TaintFunction {
8987 * The `std::string` function `data`.
9088 */
9189private class StdStringData extends TaintFunction {
92- StdStringData ( ) {
93- this = any ( StdBasicString s ) .getAnInstMemberNamed ( "data" )
94- }
90+ StdStringData ( ) { this = any ( StdBasicString s ) .getAnInstMemberNamed ( "data" ) }
9591
9692 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
9793 // flow from string itself (qualifier) to return value
@@ -109,9 +105,7 @@ private class StdStringData extends TaintFunction {
109105 * The `std::string` function `push_back`.
110106 */
111107private class StdStringPush extends TaintFunction {
112- StdStringPush ( ) {
113- this = any ( StdBasicString s ) .getAnInstMemberNamed ( "push_back" )
114- }
108+ StdStringPush ( ) { this = any ( StdBasicString s ) .getAnInstMemberNamed ( "push_back" ) }
115109
116110 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
117111 // flow from parameter to qualifier
@@ -124,9 +118,7 @@ private class StdStringPush extends TaintFunction {
124118 * The `std::string` functions `front` and `back`.
125119 */
126120private class StdStringFrontBack extends TaintFunction {
127- StdStringFrontBack ( ) {
128- this = any ( StdBasicString s ) .getAnInstMemberNamed ( [ "front" , "back" ] )
129- }
121+ StdStringFrontBack ( ) { this = any ( StdBasicString s ) .getAnInstMemberNamed ( [ "front" , "back" ] ) }
130122
131123 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
132124 // flow from object to returned reference
@@ -203,9 +195,7 @@ private class StdStringAppend extends TaintFunction {
203195 * The standard function `std::string.assign`.
204196 */
205197private class StdStringAssign extends TaintFunction {
206- StdStringAssign ( ) {
207- this = any ( StdBasicString s ) .getAnInstMemberNamed ( "assign" )
208- }
198+ StdStringAssign ( ) { this = any ( StdBasicString s ) .getAnInstMemberNamed ( "assign" ) }
209199
210200 /**
211201 * Gets the index of a parameter to this function that is a string (or
@@ -245,9 +235,7 @@ private class StdStringAssign extends TaintFunction {
245235 * The standard function `std::string.copy`.
246236 */
247237private class StdStringCopy extends TaintFunction {
248- StdStringCopy ( ) {
249- this = any ( StdBasicString s ) .getAnInstMemberNamed ( "copy" )
250- }
238+ StdStringCopy ( ) { this = any ( StdBasicString s ) .getAnInstMemberNamed ( "copy" ) }
251239
252240 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
253241 // copy(dest, num, pos)
@@ -260,9 +248,7 @@ private class StdStringCopy extends TaintFunction {
260248 * The standard function `std::string.substr`.
261249 */
262250private class StdStringSubstr extends TaintFunction {
263- StdStringSubstr ( ) {
264- this = any ( StdBasicString s ) .getAnInstMemberNamed ( "substr" )
265- }
251+ StdStringSubstr ( ) { this = any ( StdBasicString s ) .getAnInstMemberNamed ( "substr" ) }
266252
267253 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
268254 // substr(pos, num)
@@ -306,9 +292,7 @@ private class StdStringSwap extends TaintFunction {
306292 * The `std::string` functions `at` and `operator[]`.
307293 */
308294private class StdStringAt extends TaintFunction {
309- StdStringAt ( ) {
310- this = any ( StdBasicString s ) .getAnInstMemberNamed ( [ "at" , "operator[]" ] )
311- }
295+ StdStringAt ( ) { this = any ( StdBasicString s ) .getAnInstMemberNamed ( [ "at" , "operator[]" ] ) }
312296
313297 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
314298 // flow from qualifier to referenced return value
@@ -337,9 +321,7 @@ private class StdBasicIStream extends TemplateClass {
337321 * The `std::istream` function `operator>>` (defined as a member function).
338322 */
339323private class StdIStreamIn extends DataFlowFunction , TaintFunction {
340- StdIStreamIn ( ) {
341- this = any ( StdBasicIStream s ) .getAnInstMemberNamed ( "operator>>" )
342- }
324+ StdIStreamIn ( ) { this = any ( StdBasicIStream s ) .getAnInstMemberNamed ( "operator>>" ) }
343325
344326 override predicate hasDataFlow ( FunctionInput input , FunctionOutput output ) {
345327 // returns reference to `*this`
@@ -431,9 +413,7 @@ private class StdIStreamRead extends DataFlowFunction, TaintFunction {
431413 * The `std::istream` function `readsome`.
432414 */
433415private class StdIStreamReadSome extends TaintFunction {
434- StdIStreamReadSome ( ) {
435- this = any ( StdBasicIStream s ) .getAnInstMemberNamed ( "readsome" )
436- }
416+ StdIStreamReadSome ( ) { this = any ( StdBasicIStream s ) .getAnInstMemberNamed ( "readsome" ) }
437417
438418 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
439419 // flow from qualifier to first parameter
@@ -446,9 +426,7 @@ private class StdIStreamReadSome extends TaintFunction {
446426 * The `std::istream` function `putback`.
447427 */
448428private class StdIStreamPutBack extends DataFlowFunction , TaintFunction {
449- StdIStreamPutBack ( ) {
450- this = any ( StdBasicIStream s ) .getAnInstMemberNamed ( "putback" )
451- }
429+ StdIStreamPutBack ( ) { this = any ( StdBasicIStream s ) .getAnInstMemberNamed ( "putback" ) }
452430
453431 override predicate hasDataFlow ( FunctionInput input , FunctionOutput output ) {
454432 // returns reference to `*this`
@@ -481,9 +459,7 @@ private class StdIStreamPutBack extends DataFlowFunction, TaintFunction {
481459 * The `std::istream` function `getline`.
482460 */
483461private class StdIStreamGetLine extends DataFlowFunction , TaintFunction {
484- StdIStreamGetLine ( ) {
485- this = any ( StdBasicIStream s ) .getAnInstMemberNamed ( "getline" )
486- }
462+ StdIStreamGetLine ( ) { this = any ( StdBasicIStream s ) .getAnInstMemberNamed ( "getline" ) }
487463
488464 override predicate hasDataFlow ( FunctionInput input , FunctionOutput output ) {
489465 // returns reference to `*this`
@@ -609,7 +585,9 @@ private class StdOStreamOutNonMember extends DataFlowFunction, TaintFunction {
609585 * input parameter.
610586 */
611587private class StdStringStreamConstructor extends Constructor , TaintFunction {
612- StdStringStreamConstructor ( ) { this = any ( StdBasicStringStream s ) .getAnInstantiation ( ) .getAMember ( ) }
588+ StdStringStreamConstructor ( ) {
589+ this = any ( StdBasicStringStream s ) .getAnInstantiation ( ) .getAMember ( )
590+ }
613591
614592 /**
615593 * Gets the index of a parameter to this function that is a string.
@@ -633,9 +611,7 @@ private class StdStringStreamConstructor extends Constructor, TaintFunction {
633611 * The `std::stringstream` function `str`.
634612 */
635613private class StdStringStreamStr extends TaintFunction {
636- StdStringStreamStr ( ) {
637- this = any ( StdBasicStringStream s ) .getAnInstMemberNamed ( "str" )
638- }
614+ StdStringStreamStr ( ) { this = any ( StdBasicStringStream s ) .getAnInstMemberNamed ( "str" ) }
639615
640616 override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
641617 // flow from qualifier to return value (if any)
0 commit comments