Commit 84696cf
lib/vsprintf.c: remove leftover 'f' and 'F' cases from bstr_printf()
Commit 9af7706 ("lib/vsprintf: Remove support for %pF and %pf in
favour of %pS and %ps") removed support for %pF and %pf, and correctly
removed the handling of those cases in vbin_printf(). However, the
corresponding cases in bstr_printf() were left behind.
In the same series, %pf was re-purposed for dealing with
fwnodes (3bd32d6, "lib/vsprintf: Add %pfw conversion specifier
for printing fwnode names").
So should anyone use %pf with the binary printf routines,
vbin_printf() would (correctly, as it involves dereferencing the
pointer) do the string formatting to the u32 array, but bstr_printf()
would not copy the string from the u32 array, but instead interpret
the first sizeof(void*) bytes of the formatted string as a pointer -
which generally won't end well (also, all subsequent get_args would be
out of sync).
Fixes: 9af7706 ("lib/vsprintf: Remove support for %pF and %pf in favour of %pS and %ps")
Cc: [email protected]
Signed-off-by: Rasmus Villemoes <[email protected]>
Reviewed-by: Sakari Ailus <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent a48849e commit 84696cf
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3141 | 3141 | | |
3142 | 3142 | | |
3143 | 3143 | | |
3144 | | - | |
3145 | | - | |
3146 | 3144 | | |
3147 | 3145 | | |
3148 | 3146 | | |
| |||
0 commit comments