From: Li zeming <zeming@nfschina.com>
To: bagasdotme@gmail.com
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
masahiroy@kernel.org, zeming@nfschina.com
Subject: Re: [PATCH] lxdialog: menubox: Add malloc allocation judgment
Date: Mon, 24 Oct 2022 17:39:22 +0800 [thread overview]
Message-ID: <20221024093923.179944-1-zeming@nfschina.com> (raw)
In-Reply-To: <Y1ZIp1ZAu0VzQ9Wf@debian.me>
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.
prev parent reply other threads:[~2022-10-24 9:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 5:56 Li zeming
2022-10-24 8:11 ` Bagas Sanjaya
2022-10-24 9:39 ` Li zeming [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221024093923.179944-1-zeming@nfschina.com \
--to=zeming@nfschina.com \
--cc=bagasdotme@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®