When using sscanf and "%4s", the array passed in must include space for
a nul terminator.
Bug:
26739265
Change-Id: I0140a6100ca370666ae61689087ba41b4914789d
LOCAL_CFLAGS := \
-Wall \
-Werror \
- -fno-stack-protector \
-Wno-error=format-zero-length \
include $(BUILD_STATIC_LIBRARY)
uintptr_t start;
uintptr_t end;
uintptr_t offset;
- char permissions[4];
+ char permissions[5];
int name_pos;
if (sscanf(line, "%" PRIxPTR "-%" PRIxPTR " %4s %" PRIxPTR " %*x:%*x %*d %n", &start,
&end, permissions, &offset, &name_pos) < 2) {