change amalloc so it fills malloc()ed memory with a nun-null pattern, which found a WHOLE BUNCH of places where I was not null-terminating strings but instead was taking advantage of amalloc always zeroing new allocations.

This commit is contained in:
jessica parsons
2025-09-08 09:50:17 -07:00
parent 985091d673
commit 63c7eb3d86
9 changed files with 27 additions and 23 deletions
+4 -3
View File
@@ -408,6 +408,7 @@ linkysize(MMIOT *f, Footnote *ref)
EXPAND(width) = c;
c = pull(f);
}
COMPLETE(width);
}
else
pull(f);
@@ -424,6 +425,7 @@ linkysize(MMIOT *f, Footnote *ref)
EXPAND(height) = c;
c = pull(f);
}
COMPLETE(height);
}
if ( isspace(c) )
@@ -502,7 +504,7 @@ linky_extended_attributes(MMIOT *f, struct footnote *p, int start)
while ( (c = pull(f)) != '}' )
EXPAND(p->extended_attr) = c;
EXPAND(p->extended_attr) = 0;
COMPLETE(p->extended_attr);
}
@@ -2151,8 +2153,7 @@ mkd_document(Document *p, char **res)
/* Add a null byte at the end of the generated html,
* but pretend it doesn't exist.
*/
EXPAND(p->ctx->out) = 0;
--S(p->ctx->out);
COMPLETE(p->ctx->out);
}
}