]> git.ipfire.org Git - thirdparty/make.git/commit
Fix unlikely pointer overflow in abspath
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Aug 2024 08:30:44 +0000 (01:30 -0700)
committerPaul Smith <psmith@gnu.org>
Mon, 2 Sep 2024 18:43:24 +0000 (14:43 -0400)
commitbba4427b5dfba7f9cdab8fa2cac1399fceda3058
tree43623fe5090e30a8aa205bb428ac46562abf2ce1
parentc23a7e623209dae6fb36366c2e717690c9bfa042
Fix unlikely pointer overflow in abspath

* src/function.c (abspath): len is now ptrdiff_t,
to avoid GCC warning about comparing signed to unsigned.
It really is a pointer difference, after all.
Rejigger comparision to avoid undefined behavior
if dest + len is an invalid pointer.
src/function.c