diff options
author | Colin Watson <cjwatson@debian.org> | 2005-05-25 11:01:01 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2005-05-25 11:01:01 +0000 |
commit | e88de75a1a236779a10e8ccbcc51d25308be8840 (patch) | |
tree | 7495477a2a7d0cac17a9fcded020b6ea816182ef /openbsd-compat/bsd-snprintf.c | |
parent | 30a0f9443782cd9d7308acd09430bf586186aa55 (diff) | |
parent | 5d05471f6657646d1d6500c7c43134462c407ee6 (diff) |
Merge 4.0p1 to the trunk.
Diffstat (limited to 'openbsd-compat/bsd-snprintf.c')
-rw-r--r-- | openbsd-compat/bsd-snprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c index e4d8a439a..b5a7ef7a0 100644 --- a/openbsd-compat/bsd-snprintf.c +++ b/openbsd-compat/bsd-snprintf.c | |||
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | #include "includes.h" | 59 | #include "includes.h" |
60 | 60 | ||
61 | RCSID("$Id: bsd-snprintf.c,v 1.7 2003/05/18 14:13:39 djm Exp $"); | 61 | RCSID("$Id: bsd-snprintf.c,v 1.9 2004/09/23 11:35:09 dtucker Exp $"); |
62 | 62 | ||
63 | #if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */ | 63 | #if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */ |
64 | # undef HAVE_SNPRINTF | 64 | # undef HAVE_SNPRINTF |
@@ -369,7 +369,7 @@ fmtstr(char *buffer, size_t *currlen, size_t maxlen, | |||
369 | if (value == 0) | 369 | if (value == 0) |
370 | value = "<NULL>"; | 370 | value = "<NULL>"; |
371 | 371 | ||
372 | for (strln = 0; value[strln]; ++strln); /* strlen */ | 372 | for (strln = 0; strln < max && value[strln]; ++strln); /* strlen */ |
373 | padlen = min - strln; | 373 | padlen = min - strln; |
374 | if (padlen < 0) | 374 | if (padlen < 0) |
375 | padlen = 0; | 375 | padlen = 0; |