Home GnuPG
Diffusion GnuPG 3402a84720e7

Fix potential heap corruption in "gpg -v --version".
3402a84720e7Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Fix potential heap corruption in "gpg -v --version".

* g10/gpg.c (build_list): Rewrite to cope with buffer overflow in
certain locales.

This fixes an obvious bug in locales where the translated string is
longer than the original. The bug could be exhibited by using
LANG=ru_RU.utf8 gpg -v --version.

En passant we also removed the trailing white space on continued
lines.

(cherry picked from commit e33e74e3a4b2b4a0341f933410ddd5db7a12515e)

Note that this version uses utf8_charcount to get the indentation
mostly right.

  • Reported-by: Dmitry V. Levin" <ldv at altlinux.org>
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Dec 15 2012, 11:28 AM
Parents
rG7db5c81e3a40: Comment fixes.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG3402a84720e7: Fix potential heap corruption in "gpg -v --version". (authored by Werner Koch <wk@gnupg.org>).Apr 22 2013, 8:25 PM