diff options
Diffstat (limited to 'generic/regerror.c')
-rw-r--r-- | generic/regerror.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/regerror.c b/generic/regerror.c index f783217..361bd29 100644 --- a/generic/regerror.c +++ b/generic/regerror.c @@ -74,7 +74,7 @@ regerror( break; } } - sprintf(convbuf, "%d", r->code); /* -1 for unknown */ + snprintf(convbuf, sizeof(convbuf), "%d", r->code); /* -1 for unknown */ msg = convbuf; break; case REG_ITOA: /* Convert number to name */ @@ -87,7 +87,7 @@ regerror( if (r->code >= 0) { msg = r->name; } else { /* Unknown; tell him the number */ - sprintf(convbuf, "REG_%u", (unsigned)icode); + snprintf(convbuf, sizeof(convbuf), "REG_%u", (unsigned)icode); msg = convbuf; } break; @@ -100,7 +100,7 @@ regerror( if (r->code >= 0) { msg = r->explain; } else { /* Unknown; say so */ - sprintf(convbuf, unk, code); + snprintf(convbuf, sizeof(convbuf), unk, code); msg = convbuf; } break; |