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:
parent
611a87075c
commit
4f31eec94e
@ -53,6 +53,10 @@ CONFIG_MM_REGIONS=2
|
|||||||
CONFIG_MQ_MAXMSGSIZE=64
|
CONFIG_MQ_MAXMSGSIZE=64
|
||||||
CONFIG_NFILE_DESCRIPTORS=8
|
CONFIG_NFILE_DESCRIPTORS=8
|
||||||
CONFIG_NFILE_STREAMS=8
|
CONFIG_NFILE_STREAMS=8
|
||||||
|
CONFIG_NSH_FILEIOSIZE=512
|
||||||
|
CONFIG_NSH_LIBRARY=y
|
||||||
|
CONFIG_NSH_LINELEN=64
|
||||||
|
CONFIG_NSH_READLINE=y
|
||||||
CONFIG_NX=y
|
CONFIG_NX=y
|
||||||
CONFIG_NXFONT_SANS22X29B=y
|
CONFIG_NXFONT_SANS22X29B=y
|
||||||
CONFIG_NXFONT_SANS23X27=y
|
CONFIG_NXFONT_SANS23X27=y
|
||||||
|
@ -71,7 +71,7 @@ int nx_setsize(NXWINDOW hwnd, FAR const struct nxgl_size_s *size)
|
|||||||
struct nxsvrmsg_setsize_s outmsg;
|
struct nxsvrmsg_setsize_s outmsg;
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FEATURES
|
#ifdef CONFIG_DEBUG_FEATURES
|
||||||
if (!wnd || !size)
|
if (wnd == NULL || size == NULL || size->w < 0 || size->h < 0)
|
||||||
{
|
{
|
||||||
set_errno(EINVAL);
|
set_errno(EINVAL);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
@ -76,7 +76,7 @@ int nxtk_setsize(NXTKWINDOW hfwnd, FAR const struct nxgl_size_s *size)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FEATURES
|
#ifdef CONFIG_DEBUG_FEATURES
|
||||||
if (hfwnd == NULL || size == NULL)
|
if (hfwnd == NULL || size == NULL || size->w < 0 || size->h < 0)
|
||||||
{
|
{
|
||||||
set_errno(EINVAL);
|
set_errno(EINVAL);
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user