]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/env: avoid underflow of read_all_alloc() return value
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Sep 2023 09:19:37 +0000 (11:19 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Sep 2023 18:22:21 +0000 (20:22 +0200)
commit07ef43df33d4b768bc93e0961b905c459d3ece6d
treef18e6042cde5804d3b0bfb7dfd4ecdaa8e289ba3
parent1e0ad14b3ac08d855cda6de346a65f9b834e00db
lib/env: avoid underflow of read_all_alloc() return value

read_all_alloc() returns a negative error on failure.
When casting this to an unsigned type the failure check "< 1"
will not work.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
lib/env.c