You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Printf can have more arguments than conversion specifiers in format
string, example:
```c
printf("text with exhausted format\n", i++, evaluated = modify_char());
```
According to printf specification:
"If the format is exhausted while arguments remain, the excess arguments
are evaluated..."
The issue is that IGC writes excess arguments into printf buffer even
if they don't have corresponding conversion specifiers in format string.
This change introduces counting mechanism for conversion specifiers in
format string and allows only for "non-excess" arguments to be written
into printf buffer.
This change also fixes the issue of writing tagged format string address
into printf buffer - it happens when a kernel addrspacecasts format string
pointer to generic pointer.
0 commit comments