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>