Change-Id: If0c6aeb1a1d36392aff13f1a6564e625fbfc9cf0
Signed-off-by: Segwon <segwon.han@samsung.com>
static int peripheral_bus_board_get_type(void)
{
int fd, i, ret = 0;
- char str_buf[STR_BUF_MAX + 1] = {0};
+ char str_buf[STR_BUF_MAX] = {0};
int type = PB_BOARD_UNKNOWN;
fd = open(BOARD_DEVICE_TREE, O_RDONLY);
return -EIO;
}
+ str_buf[STR_BUF_MAX - 1] = '\0';
+
for (i = 0; i < PB_BOARD_UNKNOWN; i++) {
if (strstr(str_buf, pb_board_type[i].name)) {
type = pb_board_type[i].type;