diff options
author | Werner Koch <wk@gnupg.org> | 2023-05-24 12:09:47 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2023-05-24 12:12:34 +0200 |
commit | faf0a97b2e0b62fe23acdc8473033398ba2ce1bc (patch) | |
tree | e71af94c9d766daf2d0da38ec87a4fe0539acf2e /sm | |
parent | gpg: Report BEGIN_* status before examining the input. (diff) | |
download | gnupg2-faf0a97b2e0b62fe23acdc8473033398ba2ce1bc.tar.xz gnupg2-faf0a97b2e0b62fe23acdc8473033398ba2ce1bc.zip |
gpg: Improve error code for file already exists.
* g10/plaintext.c (get_output_file): Fix error code.
Diffstat (limited to 'sm')
-rw-r--r-- | sm/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sm/server.c b/sm/server.c index e44856ab9..3ec1c0c4b 100644 --- a/sm/server.c +++ b/sm/server.c @@ -1530,7 +1530,7 @@ gpgsm_status_with_err_code (ctrl_t ctrl, int no, const char *text, { char buf[30]; - sprintf (buf, "%u", (unsigned int)ec); + snprintf (buf, sizeof buf, "%u", (unsigned int)ec); if (text) return gpgsm_status2 (ctrl, no, text, buf, NULL); else |