Messages in this thread | | | From | Li zeming <> | Subject | Re: [PATCH] lxdialog: menubox: Add malloc allocation judgment | Date | Mon, 24 Oct 2022 17:39:22 +0800 |
| |
If malloc allocation fails, the menu_item pointer cannot be executed, because when the strncpy function is executed, there will be a problem with the null pointer. Adding an if statement should ensure that the allocation fails and will not be executed.
thanks.
| |