The size of defined character array must need one space (char)
for the last char ('\0'). This patch fixes the overrunt issue
by extending the size of array with +1.
Change-Id: Iec072a0337054c719bfcc59a5f0a29df9386ded4
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
static int standard_dvfs_get_available_min_freq(char *res_name)
{
char path[PATH_MAX];
- char buf[MAX_BUF_SIZE];
+ char buf[MAX_BUF_SIZE + 1];
char *p;
int ret;
static int standard_dvfs_get_available_max_freq(char *res_name)
{
char path[PATH_MAX];
- char buf[MAX_BUF_SIZE];
+ char buf[MAX_BUF_SIZE + 1];
char *p;
int ret;