Home GnuPG
Diffusion GnuPG 47f514fde6e2

common: Also protect log_inc_errorcount against counter overflow.

Description

common: Also protect log_inc_errorcount against counter overflow.

* common/logging.c (log_inc_errorcount): Also protect against
overflow.
(log_error): Call log_inc_errorcount instead of directly bumping the
counter.

We already had an overflow checking for log_error but not for the
silent increment function.

This is basically the same fix we have in libgpg-error
(libgpg-error commit d72c1ddfde09ffa69745ec2439c5a16d15e2202f)

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

Details

Provenance
wernerAuthored on Feb 10 2020, 2:55 PM
Parents
rGc1d716cd65b0: card: Add new OpenPGP card vendor.
Branches
Unknown
Tags
Unknown