mirror of
https://github.com/labwc/labwc.git
synced 2026-04-20 06:46:53 -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;
|
const char *it = text;
|
||||||
menuitem->accelerator = tolower(*it);
|
menuitem->accelerator = tolower(*it);
|
||||||
while (*it != '\0') {
|
while (*it != '\0') {
|
||||||
if (*it == '_' && *it != '\0') {
|
if (*it == '_') {
|
||||||
menuitem->accelerator = tolower(*(++it));
|
menuitem->accelerator = tolower(*(it + 1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
it++;
|
it++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue