mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:05:42 +01:00
038ed518e9
Fix valgrind memcheck error: ==1337389== Invalid write of size 1 ==1337389== at 0x4A4AFAB: __vsnprintf_internal (vsnprintf.c:117) ==1337389== by 0x4AECF40: __snprintf_chk (snprintf_chk.c:38) ==1337389== by 0x484B870: snprintf (stdio2.h:67) ==1337389== by 0x484B870: print_as_hex_bytes (nhlt-processor.c:112) ==1337389== by 0x484B870: merge_manifest_data (nhlt-processor.c:154) ==1337389== by 0x484B870: do_nhlt (nhlt-processor.c:420) ==1337389== by 0x484B870: _snd_topology_nhlt_process (nhlt-processor.c:484) The consecutive snprintf overwrites always the previous terminator until it hits the very last call of: snprintf(dst, ALSA_BYTE_CHARS + 1, "0x%02x,", *nhlt_buffer); when the size n given to snprintf is 1 more than allocated. Fixes: https://github.com/alsa-project/alsa-utils/pull/162 Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz> |
||
---|---|---|
.. | ||
nhlt | ||
alsatplg.rst | ||
Makefile.am | ||
pre-process-class.c | ||
pre-process-dai.c | ||
pre-process-dapm.c | ||
pre-process-external.h | ||
pre-process-object.c | ||
pre-processor.c | ||
pre-processor.h | ||
topology.c | ||
topology.h |