[Replicant] [PATCH] devices: fix strncmp length
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Fri Aug 16 17:52:52 UTC 2019
The external input comes from the kernel's /proc/cpuinfo,
so this should not have been exploitable.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
samsung-ipc/ipc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index 070d736..99a585a 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -74,7 +74,7 @@ int ipc_device_detect(void)
line = strtok(buffer, "\n");
while (line != NULL) {
- if (strncmp(line, "Hardware", 9) == 9) {
+ if (strncmp(line, "Hardware", 8) == 8) {
p = line + 11;
c = p;
--
2.22.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20190816/0cdf1ac0/attachment.asc>
More information about the Replicant
mailing list