[PATCH v2 0/2] lib/vsprintf: pointer handling fixes for bstr_printf() and vbin_printf()

Josh Law posted 2 patches 1 day, 12 hours ago
lib/vsprintf.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
[PATCH v2 0/2] lib/vsprintf: pointer handling fixes for bstr_printf() and vbin_printf()
Posted by Josh Law 1 day, 12 hours ago
These patches address multiple bugs in vsprintf pointer handling


Patch one: Regards argument pointer advancement in bstr_printf(),
when the buffer is full..
Patch two: Fixes a OOB write in vbin_printf() when size is 0

Josh Law (2):
  lib/vsprintf: always advance args in bstr_printf() pointer path
  lib/vsprintf: fix OOB write in vbin_printf() when size is zero

 lib/vsprintf.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)


Changes since V1:
Dropped 2 patches, probably not needed.
For patch 2: Instead of using else if (end > (char *)bin_buf),
instead guard size with else if (size) /* do nothing if size is zero */
(suggested by steven Rostedt)
-- 
2.34.1