ipacm: Change to avoid out of bound access for array
Made changes to prevent out of bound access for
L2 header type array.
Change-Id: I45e288694883be324b4b20188d37c992cd42c685
diff --git a/ipacm/src/IPACM_LanToLan.cpp b/ipacm/src/IPACM_LanToLan.cpp
index 0075418..3f4ce3a 100644
--- a/ipacm/src/IPACM_LanToLan.cpp
+++ b/ipacm/src/IPACM_LanToLan.cpp
@@ -1772,7 +1772,7 @@
{
for(i = 0; i < IPA_HDR_L2_MAX; i++)
{
- IPACMDBG_H("Ref_cnt of peer l2 type %s is %d.\n", ipa_l2_hdr_type[i], ref_cnt_peer_l2_hdr_type[i]);
+ IPACMDBG_H("Ref_cnt of peer l2 type with index %d is %d.\n", i, ref_cnt_peer_l2_hdr_type[i]);
if(ref_cnt_peer_l2_hdr_type[i] > 0)
{
IPACMDBG_H("Hdr proc ctx for peer l2 type %s: %d\n", ipa_l2_hdr_type[i], hdr_proc_ctx_for_inter_interface[i]);