]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix minor utf8-to-ucs2s read overrun bug
authorGreg Hudson <ghudson@mit.edu>
Fri, 25 Sep 2015 21:31:53 +0000 (17:31 -0400)
committerTom Yu <tlyu@mit.edu>
Wed, 2 Dec 2015 19:35:07 +0000 (14:35 -0500)
commit477b3c2c9cb76dc2832a488cda07f4171100b364
treeac794b609d7723f210df68c7418b9d137f2d6846
parent7403bd7c97821fe47e5d5ca83d216748aaa03d7e
Fix minor utf8-to-ucs2s read overrun bug

k5_utf8s_to_ucs2s() reads and ignores one extra byte from the input
string before terminating its loop, possibly overrunning the input
buffer of its caller.  This overrun is typically without consequence,
but can show up in tools like asan or valgrind during RC4
string-to-key operations.  Fix the bug by swapping the order of the
loop conditions.

(cherry picked from commit eb52da21d72faa3d00b1205a5a0fdbabc45c9e6d)

ticket: 8290 (new)
version_fixed: 1.13.3
status: resolved
src/util/support/utf8_conv.c