diff options
Diffstat (limited to 'scd')
-rw-r--r-- | scd/app-openpgp.c | 2 | ||||
-rw-r--r-- | scd/scdaemon.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 843fdf0fb..093109501 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -1872,7 +1872,7 @@ verify_a_chv (app_t app, prompt_buffer = xtrymalloc (promptsize); if (!prompt_buffer) return gpg_error_from_syserror (); - snprintf (prompt_buffer, promptsize-1, PROMPTSTRING, sigcount); + snprintf (prompt_buffer, promptsize, PROMPTSTRING, sigcount); prompt = prompt_buffer; #undef PROMPTSTRING } diff --git a/scd/scdaemon.c b/scd/scdaemon.c index df1abe8b7..ab2fadbb3 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -1292,8 +1292,7 @@ handle_connections (int listen_fd) char threadname[50]; npth_t thread; - snprintf (threadname, sizeof threadname-1, "conn fd=%d", fd); - threadname[sizeof threadname -1] = 0; + snprintf (threadname, sizeof threadname, "conn fd=%d", fd); ctrl->thread_startup.fd = INT2FD (fd); ret = npth_create (&thread, &tattr, start_connection_thread, ctrl); if (ret) |