mirror of
https://github.com/labwc/labwc.git
synced 2026-04-18 06:46:46 -04:00
menu: fix possible buffer over-read in item_create()
This commit is contained in:
parent
310c15058d
commit
eba57831f4
1 changed files with 2 additions and 2 deletions
|
|
@ -147,8 +147,8 @@ item_create(struct menu *menu, const char *text, const char *icon_name, bool sho
|
|||
const char *it = text;
|
||||
menuitem->accelerator = tolower(*it);
|
||||
while (*it != '\0') {
|
||||
if (*it == '_' && *it != '\0') {
|
||||
menuitem->accelerator = tolower(*(++it));
|
||||
if (*it == '_') {
|
||||
menuitem->accelerator = tolower(*(it + 1));
|
||||
break;
|
||||
}
|
||||
it++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue