Skip to content

Commit 1b71acc

Browse files
committed
CPP: Fix a bug in FormattingFunction.getDefaultCharType.
1 parent e59b3c2 commit 1b71acc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cpp/ql/src/semmle/code/cpp/models/interfaces/FormattingFunction.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@ abstract class FormattingFunction extends Function {
5757
* `char` or `wchar_t`.
5858
*/
5959
Type getDefaultCharType() {
60-
result = stripTopLevelSpecifiersOnly(getParameter(getFormatParameterIndex()).getType().
61-
getUnderlyingType().(PointerType).getBaseType())
60+
result =
61+
stripTopLevelSpecifiersOnly(
62+
stripTopLevelSpecifiersOnly(
63+
getParameter(getFormatParameterIndex()).getType().getUnderlyingType()
64+
).(PointerType).getBaseType()
65+
)
6266
}
6367

6468
/**

0 commit comments

Comments
 (0)