Home GnuPG

Add fail-safe string termination for snprintf.
8f51108a17d0Unpublished

Unpublished Commit · Learn More

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

Description

Add fail-safe string termination for snprintf.

* gtk+-2/pinentry-gtk-2.c (changed_text_handler): Make sure an
 snprintf buffer is always ternminated.
* pinentry/pinentry.c (my_strusage): Ditto.
(write_status_error): Ditto.
(cmd_getinfo): Ditto.
* w32/main.c (w32_strerror): Ditto.

This is to fix the surprising implementation of snprintf on Windows.
Note that we don't need this in GnuPG because there we use our own
snprintf.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Nov 7 2016, 8:37 AM
Parents
rP15a6fd9f1ee0: gnome3: Avoid risk of uinitialized memory access.
Branches
Unknown
Tags
Unknown