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:43:11 +0000 (11:43 -0400)
commit4b7f1097541ea9663e070cf8a9fa5411ab8e62a7
tree2cf8b0762766fb42e3686da43bbd449499bd7656
parent55f2155d3a7ddd376cc705dc8431c95ee233b0f9
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.026557 seconds and 5 git commands to generate.