Skip to contentSkip to conversation

LoadTable() operator fails

PATCH In review Kenji Kaneshige 1 participant 2 messages Jan 5, 2005 – Jan 7, 2005 1 message not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 LoadTable() operator fails

Hi,

The execution of the LoadTable() operator might fail because of the bug on OEM ID comparison. The following patch fixes this issue.

---

 linux-2.6.10-kanesige/drivers/acpi/tables/tbxfroot.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/acpi/tables/tbxfroot.c~fix_acpi_tb_find_table drivers/acpi/tables/tbxfroot.c
--- linux-2.6.10/drivers/acpi/tables/tbxfroot.c~fix_acpi_tb_find_table

2005-01-04 09:05:29.000000000 +0900

+++ linux-2.6.10-kanesige/drivers/acpi/tables/tbxfroot.c 2005-01-04
09:05:29.000000000 +0900
@@ -114,8 +114,8 @@ acpi_tb_find_table (

/* Check oem_id and oem_table_id */

- if ((oem_id[0] && ACPI_STRCMP (oem_id, table->oem_id)) ||
- (oem_table_id[0] && ACPI_STRCMP (oem_table_id, table->oem_table_id))) {
+ if ((oem_id[0] && ACPI_STRNCMP (oem_id, table->oem_id, sizeof
(table->oem_id))) ||
+ (oem_table_id[0] && ACPI_STRNCMP (oem_table_id, table->oem_table_id,
sizeof (table->oem_table_id)))) {
return_ACPI_STATUS (AE_AML_NAME_NOT_FOUND);
}

_

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

#2 lore raw
In reply to a message not in the archive

Hi,

My mailer inserted unnecessary line feeds into the patch. So I send it again.

Thanks,
Kenji Kaneshige

Quoted 36 lines · Kenji Kaneshige

Hi,

The execution of the LoadTable() operator might fail because of the bug on OEM ID comparison. The following patch fixes this issue.

---

 linux-2.6.10-kanesige/drivers/acpi/tables/tbxfroot.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/acpi/tables/tbxfroot.c~fix_acpi_tb_find_table drivers/acpi/tables/tbxfroot.c
--- linux-2.6.10/drivers/acpi/tables/tbxfroot.c~fix_acpi_tb_find_table

2005-01-04 09:05:29.000000000 +0900

+++ linux-2.6.10-kanesige/drivers/acpi/tables/tbxfroot.c 2005-01-04
09:05:29.000000000 +0900

(quoted diff) +1 -2
@@ -114,8 +114,8 @@ acpi_tb_find_table (
 
 	/* Check oem_id and oem_table_id */
 
-	if ((oem_id[0]     && ACPI_STRCMP (oem_id, table->oem_id)) ||
-		(oem_table_id[0] && ACPI_STRCMP (oem_table_id, table->oem_table_id))) {
+	if ((oem_id[0]     && ACPI_STRNCMP (oem_id, table->oem_id, sizeof

(table->oem_id))) ||

(quoted diff) +1 -0
+		(oem_table_id[0] && ACPI_STRNCMP (oem_table_id, table->oem_table_id,

sizeof (table->oem_table_id)))) {

(quoted diff) +0 -0
 		return_ACPI_STATUS (AE_AML_NAME_NOT_FOUND);
 	}

_

Quoted 9 lines

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Acpi-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-devel

The execution of the LoadTable() operator might fail because of the bug on OEM ID comparison. The following patch fixes this issue.

---

 linux-2.6.10-kanesige/drivers/acpi/tables/tbxfroot.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/tables/tbxfroot.c renamed from drivers/acpi/tables/tbxfroot.c~fix_acpi_tb_find_table +2 -2
diff -puN drivers/acpi/tables/tbxfroot.c~fix_acpi_tb_find_table drivers/acpi/tables/tbxfroot.c
@@ -114,8 +114,8 @@ acpi_tb_find_table (
 
 	/* Check oem_id and oem_table_id */
 
-	if ((oem_id[0]     && ACPI_STRCMP (oem_id, table->oem_id)) ||
-		(oem_table_id[0] && ACPI_STRCMP (oem_table_id, table->oem_table_id))) {
+	if ((oem_id[0]     && ACPI_STRNCMP (oem_id, table->oem_id, sizeof (table->oem_id))) ||
+		(oem_table_id[0] && ACPI_STRNCMP (oem_table_id, table->oem_table_id, sizeof (table->oem_table_id)))) {
 		return_ACPI_STATUS (AE_AML_NAME_NOT_FOUND);
 	}
 

_