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
The following code in tests/string_test.c will fail to zero-terminate sfname on first iteration which may cause read overflow in psf_store_string:
for (k = 0 ; k < 50 ; k++)
{ const char *result ;
...
snprintf (sfname, MIN (k, sizeof (sfname)), "%s", "abcdefghijklmnopqrestvwxyz0123456789abcdefghijklmnopqrestvwxyz") ;
exit_if_true (sf_set_string (file, SF_STR_SOFTWARE, sfname),
Valgrind report is
==23799== Conditional jump or move depends on uninitialised value(s)
==23799== at 0x4C30F69: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23799== by 0x52808C1: psf_store_string (/build/libsndfile-1.0.25/src/strings.c:42)
==23799== by 0x401A6B: software_string_test (/build/libsndfile-1.0.25/tests/string_test.c:646)
==23799== by 0x401A6B: main (/build/libsndfile-1.0.25/tests/string_test.c:81)
The issue has been found using Valgrind (obviously) and debian_pkg_test.
The text was updated successfully, but these errors were encountered:
The following code in tests/string_test.c will fail to zero-terminate
sfname
on first iteration which may cause read overflow inpsf_store_string
:Valgrind report is
The issue has been found using Valgrind (obviously) and debian_pkg_test.
The text was updated successfully, but these errors were encountered: