From: Eugene Syromyatnikov Date: Fri, 18 Nov 2016 17:36:21 +0000 (+0300) Subject: prctl: cast arg2 to int in PR_SET_PTRACER handler X-Git-Tag: v4.15~101 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b7ad9947bb9766b07594a6cd1e46e01980f78b6;p=strace prctl: cast arg2 to int in PR_SET_PTRACER handler Kernel code does this when compares it with -1 (apart from comparing it with PR_SET_PTRACER_ANY, which is also -1) in security/yama/yama_lsm.c. * prctl.c (SYS_FUNC(prctl)) : Cast arg2 to int before comparing it with -1. --- diff --git a/prctl.c b/prctl.c index e8dd4e81..fb244563 100644 --- a/prctl.c +++ b/prctl.c @@ -255,7 +255,7 @@ SYS_FUNC(prctl) case PR_SET_PTRACER: tprints(", "); - if (arg2 == -1) + if ((int) arg2 == -1) tprints("PR_SET_PTRACER_ANY"); else tprintf("%llu", arg2);