lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Sun, 27 Nov 2011 22:26:20 +0100
From:	"Witold Szczeponik" <Witold.Szczeponik@....net>
To:	linux-acpi@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH, trivial] PNP: Use constant PNP_ID_LEN instead of literal
 number

The attached patch uses the constant PNP_ID_LEN instead of using a 
literal number for the length of a PNP ID in the scope of PNP quirks.

As a consequence, all IDs used in PNP quirks (c.f. "drivers/pnp/quirks.c") 
are now zero-terminated and standard functions that depend on the IDs 
to be zero-terminated now work reliably (c.f. "strlen" in "drivers/pnp/driver.c", 
function "compare_pnp_id"). 


The patch is applied against 3.1. 


Signed-off-by: Witold Szczeponik <Witold.Szczeponik@....net>



Index: linux/include/linux/pnp.h
===================================================================
--- linux.orig/include/linux/pnp.h
+++ linux/include/linux/pnp.h
@@ -295,7 +295,7 @@ static inline void pnp_set_drvdata(struc
 }
 
 struct pnp_fixup {
-	char id[7];
+	char id[PNP_ID_LEN];
 	void (*quirk_function) (struct pnp_dev * dev);	/* fixup function */
 };
 

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ