Re: [PATCH] lxdialog: menubox: Add malloc allocation judgment

From: Li zeming
Date: Mon Oct 24 2022 - 05:39:50 EST



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.