[Replicant] [PATCH] devices: fix strncmp length
Fil
fil.bergamo at riseup.net
Fri Aug 16 20:33:31 UTC 2019
Better be safe than sorry! ;)
Acked-by: Fil Bergamo <fil.bergamo at riseup.net>
On 16/08/19 19:52, Denis 'GNUtoo' Carikli wrote:
> 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;
>
>
>
> _______________________________________________
> Replicant mailing list
> Replicant at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/replicant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20190816/491faaf7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20190816/491faaf7/attachment.asc>
More information about the Replicant
mailing list