summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2016-06-12 05:37:26 -0600
committerEduardo Chappa <chappa@washington.edu>2016-06-12 05:37:26 -0600
commit88c09c6f0af538d8dfad2cf2b7fb633339d0afc9 (patch)
treee1640ca4f2564709e3d5f16198f5031c2462657d
parentac3d691ed77f2c71e986d618f1fe93a69ee74b54 (diff)
downloadalpine-88c09c6f0af538d8dfad2cf2b7fb633339d0afc9.tar.xz
* Replace snprintf by sprintf in mailutil.c since Visual Studio has
problems building when the former function in used. Reported by Ulf-Dietrich Braumann.
-rw-r--r--imap/src/mailutil/mailutil.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/imap/src/mailutil/mailutil.c b/imap/src/mailutil/mailutil.c
index 04198879..88408e72 100644
--- a/imap/src/mailutil/mailutil.c
+++ b/imap/src/mailutil/mailutil.c
@@ -484,11 +484,12 @@ void mailutil_add_sequence(char **sequence, size_t *len, unsigned long i, unsign
return;
if(i == j)
- snprintf(tmp, sizeof(tmp), "%s%lu", *len == 0L ? "" : ",", i);
+ sprintf(tmp, "%s%lu", *len == 0L ? "" : ",", i);
else if(j == nmsgs)
- snprintf(tmp, sizeof(tmp), "%s%lu:*", *len == 0L ? "" : ",", i);
+ sprintf(tmp, "%s%lu:*", *len == 0L ? "" : ",", i);
else
- snprintf(tmp, sizeof(tmp), "%s%lu:%lu", *len == 0L ? "" : ",", i, j);
+ sprintf(tmp, "%s%lu:%lu", *len == 0L ? "" : ",", i, j);
+ tmp[sizeof(tmp)-1]='\0';
needed = strlen(*sequence ? *sequence : "") + strlen(tmp) + 1;
if(needed > *len){