common: Use larger buffer for homedir in case of 64 bit UIDs.
authorWerner Koch <wk@gnupg.org>
Wed, 20 Dec 2017 14:37:29 +0000 (15:37 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 20 Dec 2017 14:37:29 +0000 (15:37 +0100)
commit290348e349e8d56a856f187a08e913f2ed525b3c
tree989271ea9df5f2437e1a1c18d93ddd873894201f
parent84555d53720cc9240535ed9b57f1efcc9927f6dc
common: Use larger buffer for homedir in case of 64 bit UIDs.

* common/homedir.c (_gnupg_socketdir_internal): Enlarge PREFIX by 6
bytes for "/gnupg".
--

The temporary buffer was to short for the extra "/gnupg".  However the
20 bytes for the UID is large enough for all 32 bit UIDs and would
only fail (detected) if  a 64 bit UID is used.

Fixes-commit: 17efcd2a2acdc3b7f00711272aa51e5be2476921
Reported-by: Rainer Perske.
Signed-off-by: Werner Koch <wk@gnupg.org>
common/homedir.c