From: Dan Carpenter <dan.carpenter@oracle.com>
To: lv.zheng@intel.com
Cc: linux-acpi@vger.kernel.org
Subject: re: ACPICA: Linuxize: Export debugger files to Linux
Date: Tue, 3 Nov 2015 17:25:11 +0300 [thread overview]
Message-ID: <20151103142511.GB28591@mwanda> (raw)
Hello Lv Zheng,
This is a semi-automatic email about new static checker warnings.
The patch 995751025572: "ACPICA: Linuxize: Export debugger files to
Linux" from Oct 19, 2015, leads to the following Smatch complaint:
drivers/acpi/acpica/dbcmds.c:1159 acpi_db_trace()
error: we previously assumed 'enable_arg' could be null (see line 1134)
drivers/acpi/acpica/dbcmds.c
1133
1134 if (enable_arg) {
^^^^^^^^^^
Check for NULL.
1135 acpi_ut_strupr(enable_arg);
1136 }
1137
1138 if (once_arg) {
1139 acpi_ut_strupr(once_arg);
1140 }
1141
1142 if (method_arg) {
1143 if (acpi_db_trace_method_name) {
1144 ACPI_FREE(acpi_db_trace_method_name);
1145 acpi_db_trace_method_name = NULL;
1146 }
1147
1148 acpi_db_trace_method_name =
1149 ACPI_ALLOCATE(strlen(method_arg) + 1);
1150 if (!acpi_db_trace_method_name) {
1151 acpi_os_printf("Failed to allocate method name (%s)\n",
1152 method_arg);
1153 return;
1154 }
1155
1156 strcpy(acpi_db_trace_method_name, method_arg);
1157 }
1158
1159 if (!strcmp(enable_arg, "ENABLE") ||
^^^^^^^^^^
Unchecked dereferences.
1160 !strcmp(enable_arg, "METHOD") || !strcmp(enable_arg, "OPCODE")) {
1161 if (!strcmp(enable_arg, "ENABLE")) {
regards,
dan carpenter
next reply other threads:[~2015-11-03 14:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 14:25 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-11-03 14:25 ACPICA: Linuxize: Export debugger files to Linux Dan Carpenter
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=20151103142511.GB28591@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-acpi@vger.kernel.org \
--cc=lv.zheng@intel.com \
/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