Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core/pldm: Fix Use of uninitialised value
In decode_platform_event_message_resp() when response.completion_code is not PLDM_SUCCESS then response.platform_event_status remain uninitialized this end up triggering following warning ==48024== Use of uninitialised value of size 8 ==48024== at 0x48D12CB: _itoa_word (_itoa.c:183) ==48024== by 0x48DBFA1: __printf_buffer (vfprintf-process-arg.c:155) ==48024== by 0x48DE072: __vfprintf_internal (vfprintf-internal.c:1559) ==48024== by 0x42DD97: vprintf (stdio.h:41) ==48024== by 0x42DD97: _prlog (stubs.c:27) ==48024== by 0x426C92: send_repository_changed_event (pldm-platform-requests.c:929) ==48024== by 0x426E7D: add_hosted_pdrs (pldm-platform-requests.c:973) ==48024== by 0x427752: pldm_platform_init (pldm-platform-requests.c:1226) Fix issue by intializing struct response with 0. Signed-off-by: Abhishek Singh Tomar <[email protected]> Signed-off-by: Reza Arbab <[email protected]>
- Loading branch information