]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Avoid underflow in strlcpy and strlcat wrappers when count is zero
authorTom Hughes <tom@compton.nu>
Tue, 14 Nov 2017 09:16:26 +0000 (09:16 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 14 Nov 2017 09:16:26 +0000 (09:16 +0000)
commita5af4146e383dd442130905901b046e2cb4b0ed4
tree1a3b26a02a6f489126922332bbff3fae3df88700
parent286d05eea0fc1059492bec127d4121770902c98c
Avoid underflow in strlcpy and strlcat wrappers when count is zero

We can't decrement n because it's unsigned and might be zero which
means it would wrap and we'd wind up reading far too much.

Fixes BZ#208052
shared/vg_replace_strmem.c