summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/enc.c
diff options
context:
space:
mode:
authorcheloha <>2021-12-07 04:01:45 +0000
committercheloha <>2021-12-07 04:01:45 +0000
commit0dac27b8f62da9acb2557baf3463eaa689bc0332 (patch)
treefb01e229aaae158bfbe4d7b52b61fa7fc95e523c /src/usr.bin/openssl/enc.c
parent1899d459607a5a561a64371d6a7eecdd4407fc43 (diff)
downloadopenbsd-0dac27b8f62da9acb2557baf3463eaa689bc0332.tar.gz
openbsd-0dac27b8f62da9acb2557baf3463eaa689bc0332.tar.bz2
openbsd-0dac27b8f62da9acb2557baf3463eaa689bc0332.zip
lsearch(3): append key to array with memmove(3) instead of memcpy(3)
If the key overlaps the end of the array, memcpy(3) mutates the key and copies a corrupted value into the end of the array. If we use memmove(3) instead we at least end up with a clean copy of the key at the end of the array. This is closer to the intended behavior. With input from millert@ and deraadt@. Thread: https://marc.info/?l=openbsd-tech&m=163880307403606&w=2 ok millert@
Diffstat (limited to 'src/usr.bin/openssl/enc.c')
0 files changed, 0 insertions, 0 deletions