diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-08-16 17:48:35 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-09-06 21:13:01 +0200 |
commit | 95165600e98134f8c7d3fe9957fed0a8c5ac5041 (patch) | |
tree | b36ee3a844a20b5eb435241b9993fcd135375b0d | |
parent | 63717f80fe7f4e5032fd092e0058394aa2cba2cd (diff) | |
download | hardware_replicant_libsamsung-ipc-95165600e98134f8c7d3fe9957fed0a8c5ac5041.tar.gz hardware_replicant_libsamsung-ipc-95165600e98134f8c7d3fe9957fed0a8c5ac5041.tar.bz2 hardware_replicant_libsamsung-ipc-95165600e98134f8c7d3fe9957fed0a8c5ac5041.zip |
devices: fix strncmp length
The external input comes from the kernel's /proc/cpuinfo,
so this should not have been exploitable.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Fil Bergamo <fil.bergamo@riseup.net>
-rw-r--r-- | samsung-ipc/ipc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |