Searched hist:"686 f60f519a3b06dfc4571cfb0dd832467179479" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/lib/ |
| H A D | vsprintf.c | 686f60f519a3b06dfc4571cfb0dd832467179479 Thu Dec 19 23:14:19 UTC 2013 Darwin Rambo <drambo@broadcom.com> lib: fix return codes when CONFIG_SYS_VSNPRINTF is enabled
When CONFIG_SYS_VSNPRINTF is enabled, it protects print operations such as sprintf, snprintf, vsnprintf, etc., from buffer overflows. But vsnprintf_internal includes the terminating NULL character in the calculation of number of characters written. This affects sprintf and snprintf return values. Fix this issue by setting pointer 'str' back to the location of the '\0'.
Signed-off-by: Darwin Rambo <drambo@broadcom.com> Reviewed-by: Steve Rae <srae@broadcom.com>
|