diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2019-07-09 11:11:57 +0300 |
---|---|---|
committer | himanshu <h.himanshu@samsung.com> | 2020-02-11 14:27:47 +0530 |
commit | febbb38bf30c418b05123e6b9945f402232debd0 (patch) | |
tree | d957b787f9dfe8c2701d674cd3ef8bf1ab41578e /src | |
parent | c5bfb64d0a11d24d6269ae0f0001f3f51f8bd190 (diff) | |
download | bluez-febbb38bf30c418b05123e6b9945f402232debd0.tar.gz bluez-febbb38bf30c418b05123e6b9945f402232debd0.tar.bz2 bluez-febbb38bf30c418b05123e6b9945f402232debd0.zip |
shared/hfp: Fix using uninitialized value
This fixes the following trace when running unit tests:
at 0x409597: is_response (hfp.c:1009)
by 0x409597: hf_call_prefix_handler (hfp.c:1103)
by 0x409955: hf_process_input (hfp.c:1176)
by 0x409955: hf_can_read_data (hfp.c:1240)
by 0x40C0E8: watch_callback (io-glib.c:170)
by 0x48C3EDC: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.6000.3)
by 0x48C426F: ??? (in /usr/lib64/libglib-2.0.so.0.6000.3)
by 0x48C45A2: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.6000.3)
by 0x40C94C: mainloop_run (mainloop-glib.c:79)
by 0x40CEF9: mainloop_run_with_signal (mainloop-notify.c:201)
by 0x408A43: tester_run (tester.c:870)
by 0x404E04: main (test-hfp.c:865)
Change-Id: Ie720545383bf5ec748b20afd6b87517fa22bdef8
Signed-off-by: himanshu <h.himanshu@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/shared/hfp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/hfp.c b/src/shared/hfp.c index d9f7659c..cc286a0f 100755 --- a/src/shared/hfp.c +++ b/src/shared/hfp.c @@ -1074,7 +1074,7 @@ static void hf_call_prefix_handler(struct hfp_hf *hfp, const char *data) struct hfp_context context; enum hfp_result result; enum hfp_error cme_err; - char lookup_prefix[18]; + char lookup_prefix[18] = {}; uint8_t pref_len = 0; const char *prefix; int i; |