Doing string operation with strlen() result, there is possibilty
of omission of termination character. Do stringop with termination
character with strlen() + 1. The destination buffer is allocated
sum of all strlen() and 1, there is no overflow.
Change-Id: I35627dbbb0ac72bc58398ccfffa43802729c5b85
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
}
strncpy(file, DFU_MOUNT_PATH, path_prefix + 1);
- strncat(file, info[DFU_INFO_PATH], path_suffix);
- strncat(file, info[DFU_INFO_NAME], path_name);
+ strncat(file, info[DFU_INFO_PATH], path_suffix + 1);
+ strncat(file, info[DFU_INFO_NAME], path_name + 1);
break;
}
default: