Fix: runas: less-than-zero comparison of an unsigned value
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 6 Aug 2021 13:40:20 +0000 (09:40 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 6 Aug 2021 15:44:13 +0000 (11:44 -0400)
commitc043a8d8da78bed7e11ad7e578466b83a42d3695
tree10a634ff7079535d173121a769dced8ef3e19bd3
parenta62bbe8cacc7014175da33f64f917533fea7810d
Fix: runas: less-than-zero comparison of an unsigned value

Fixes two defects found by Coverity related to unsigned integers being
treated as signed.

Reported by Coverity:
    CID 1461333:  Control flow issues  (NO_EFFECT)
    This less-than-zero comparison of an unsigned value is never true. "buf_size < 0UL".

    CID 1461332:  Integer handling issues  (NEGATIVE_RETURNS)
    "buf_size" is passed to a parameter that cannot be negative.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Id6d4a71960f2ef34f14c05e66ef5d934b7a3e524
src/common/runas.c
This page took 0.0251 seconds and 4 git commands to generate.