// malloc() may fail, and str will be NULL.
str=(char*)malloc(strlen(pwd_entry->pw_dir)+14);
// write to Null
snprintf(str,strlen(pwd_entry->pw_dir)+14,"%s/.bwm-ng.conf",pwd_entry->pw_dir);
I think this is a vulnerability, and maybe we can patch it as following?
Hi,
In src/options.c, line 337.
// malloc() may fail, and str will be NULL.
str=(char*)malloc(strlen(pwd_entry->pw_dir)+14);
// write to Null
snprintf(str,strlen(pwd_entry->pw_dir)+14,"%s/.bwm-ng.conf",pwd_entry->pw_dir);
I think this is a vulnerability, and maybe we can patch it as following?
str=(char*)malloc(strlen(pwd_entry->pw_dir)+14);
if(!str) return
Thanks for any consideration!
Peiyu Liu,
NESA lab,
Zhejiang University
The text was updated successfully, but these errors were encountered: