URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=72a6a8cb5c7172f39f7677c27ce781d7816723a3
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
72a6a8c by Jakub Zawadzki (darkjames@xxxxxxxxxxxx):
Fixes after wmem_strdup_vprintf() optimization
- g_vsnprintf()[1] buffer size can includes space for terminating NUL,
this simplifies code, and fix problems with string truncation
- g_vsnprintf() returns number of bytes without terminating NUL, so we
need to do + 1
- second g_vsnprintf() call use already consumed 'ap2' va_arg, which
makes wmem_strdup_vprintf() doesn't work/ crash for FORMATTED string length > 80
[1] https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-vsnprintf
Change-Id: I0ebb7f452e3e89c9b55f8ac889166f02e8a7c982
Reviewed-on: https://code.wireshark.org/review/1667
Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
Actions performed:
from 25ba4a2 Guard closing capture window with ifdef.
adds 72a6a8c Fixes after wmem_strdup_vprintf() optimization
Summary of changes:
epan/wmem/wmem_strutl.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)