the dud "ISO-8859-" is the buffer initializer which i
believe is caused by norm_charmap being asked to work on its own output.
i've fixed this by malloc()ing that buffer; see attached patch.
Thanks! However ... that will result in a memory leak, yes? Okay,
you'll point out that nmh is terrible on memory management and I won't
disagree, but I don't think that's an excuse for making it worse.
Fixing this properly either means we need to be much more clever in
norm_charmap(), or always allocate a buffer and fix every caller of
norm_charmap(). Sigh.
Right. I just committed (locally) a fix for mhshow. I looked
at other uses and they look OK. It turns out that other callers
(get_charset(), write_charset_8bit()) pass along the result of
norm_charmap(). Fixing every caller will be invasive.
I'll push the fix in a few minutes (I'm trying to track down the
sendfiles test problem with lzma).
David
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers