Invalid read of size 1
at 0x4B02F70: ____strtoul_l_internal (strtol_l.c:432)
by 0x4B027F7: strtoul (strtol.c:106)
by 0x489628F: ??? (in /usr/lib/libcapi-network-bluetooth.so.0.6.0)
Change-Id: I074cacec908b65fd87e5376be16d96df528aa9f1
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
}
/* ptr[4] contain "08x" and "04hx" */
- ptr[5] = g_malloc0(sizeof(char) * 8);
- ptr[6] = g_malloc0(sizeof(char) * 4);
+ ptr[5] = g_malloc0(sizeof(char) * 8 + 1);
+ ptr[6] = g_malloc0(sizeof(char) * 4 + 1);
strncpy(ptr[5], ptr[4], 8);
strncpy(ptr[6], ptr[4] + 8, 4);