Fix an OOB read access in _ksba_dn_to_str.
authorWerner Koch <wk@gnupg.org>
Tue, 3 May 2016 14:01:09 +0000 (16:01 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 3 May 2016 14:01:09 +0000 (16:01 +0200)
commit6be61daac047d8e6aa941eb103f8e71a1d4e3c75
tree0c4375d661ca899a137475c9f3b62603f379023c
parenta7eed17a0b2a1c09ef986f3b4b323cd31cea2b64
Fix an OOB read access in _ksba_dn_to_str.

* src/dn.c (append_utf8_value): Use a straightforward check to fix an
off-by-one.
--

The old fix for the problem from April 2015 had an off-by-one in the
bad encoding handing.

Fixes-commit: 243d12fdec66a4360fbb3e307a046b39b5b4ffc3
GnuPG-bug-id: 2344
Reported-by: Pascal Cuoq
Signed-off-by: Werner Koch <wk@gnupg.org>
src/dn.c