mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 05:55:46 +08:00
libs/libnx/nxmu/: Add a few bad input parameter checks. configs/lpcxpresso-lpc54628/twm4nx/defconfig: Need to enable the NX library.
This commit is contained in:
@@ -76,7 +76,7 @@ int nxtk_setsize(NXTKWINDOW hfwnd, FAR const struct nxgl_size_s *size)
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
if (hfwnd == NULL || size == NULL)
|
||||
if (hfwnd == NULL || size == NULL || size->w < 0 || size->h < 0)
|
||||
{
|
||||
set_errno(EINVAL);
|
||||
return ERROR;
|
||||
|
||||
Reference in New Issue
Block a user