Thank you, Alexander.

Committed as r1213.

Index: src/direnum.c
===================================================================
--- src/direnum.c       (Revision 1212)
+++ src/direnum.c       (Arbeitskopie)
@@ -503,6 +503,10 @@ int dir__enumerator(struct estat *this,
                         * How much should we add? For now, just give about 
30%. */
                        /* size*21: Let's hope that this won't overflow :-) */
                        size=(size*21)/16;
+                       /* If +20% is not at least the buffer size (FREE_SPACE),
+                        * take at least that much memory. */
+                       if (size < mark+FREE_SPACE) size=mark+FREE_SPACE;
+
                        strings=realloc(strings, size);
                        DEBUGP("strings realloc(%p, %d)", strings, size);
                        STOPIF_ENOMEM( !strings);


-- 
Versioning your /etc, /home or even your whole installation?
             Try fsvs (fsvs.tigris.org)!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to