commit 2e39fa9930b6475497db367434ca8928092096ff
Author: Oswald Buddenhagen <[email protected]>
Date: Sat Jul 29 11:53:47 2006 +0000
work around glibc bug: printf("%.*s", INT_MAX, s) tries to allocate 2G.
src/drv_maildir.c | 2 +-
src/mdconvert.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/drv_maildir.c b/src/drv_maildir.c
index e5235c1..54cadc1 100644
--- a/src/drv_maildir.c
+++ b/src/drv_maildir.c
@@ -640,7 +640,7 @@ maildir_scan( maildir_store_t *ctx, msglist_t *msglist )
if (u)
ml = u - entry->base;
else
- ru = "", ml = INT_MAX;
+ ru = "", ml = sizeof(buf);
fnl = nfsnprintf( buf + bl, sizeof(buf) - bl,
"%s/%.*s,U=%d%s", subdirs[entry->recent], ml, entry->base, uid, ru ) + 1 - 4;
memcpy( nbuf, buf, bl + 4 );
nfsnprintf( nbuf + bl + 4, sizeof(nbuf) - bl -
4, "%s", entry->base );
diff --git a/src/mdconvert.c b/src/mdconvert.c
index f2c60a1..12ff788 100644
--- a/src/mdconvert.c
+++ b/src/mdconvert.c
@@ -154,7 +154,7 @@ convert( const char *box, int altmap )
if (u)
ml = u - e->d_name;
else
- ru = "", ml = INT_MAX;
+ ru = "", ml = sizeof(buf);
if (altmap) {
if (!p)
continue;
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel