summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index 272390139c..fc4e08ff07 100644
--- a/error.c
+++ b/error.c
@@ -497,7 +497,7 @@ get_syserr(int n)
if (!st_lookup(syserr_tbl, n, &error)) {
char name[8]; /* some Windows' errno have 5 digits. */
- sprintf(name, "E%03d", n);
+ snprintf(name, sizeof(name), "E%03d", n);
error = set_syserr(n, name);
}
return error;