summaryrefslogtreecommitdiffstats
path: root/mbbsd/pmore.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/pmore.c')
-rw-r--r--mbbsd/pmore.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c
index 26f73a38..dd22ed60 100644
--- a/mbbsd/pmore.c
+++ b/mbbsd/pmore.c
@@ -809,7 +809,16 @@ mf_parseHeaders()
// p is pointing at a new line. (\n)
l = (int)(p - pb);
+#ifdef CRITICAL_MEMORY
+ // kcwu: dirty hack, avoid 64byte slot. use 128byte slot instead.
+ if (l<100) {
+ p = (unsigned char*) malloc (100+1);
+ } else {
+ p = (unsigned char*) malloc (l+1);
+ }
+#else
p = (unsigned char*) malloc (l+1);
+#endif
fh.headers[i] = p;
memcpy(p, pb, l);
p[l] = 0;