From: Ken Hornstein Date: Mon, 21 Jan 2013 15:32:37 +0000 (-0500) Subject: Fix a bug leading to message corruption with inc when incorporation more X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/22d2acba60374851c291260ff6aa716e9bf44a6d?hp=22d2acba60374851c291260ff6aa716e9bf44a6d Fix a bug leading to message corruption with inc when incorporation more than one message at a time. When I reworked the scan() code to remove the use of stdio internals, two code paths were created. The inc code path consumed another buffer from the nxtbuf list for processing the message body. At the end of scan() there was code to push back all of the consumed buffers to the nxtbuf list. The extra buffer consumed in the inc code path wasn't being pushed back, and as a result the nxtbuf list would end up with duplicate pointers in it. This would result in two components sharing the same text buffer, which caused the message corruption. When I looked at this closer, I realized that there was no reason to push those buffers back to the list; nxtbuf gets reset to compbuffers at the start of every call to scan(), and nxtbuf isn't used after the buffers are pushed back. Some researched revealed that this was the same back in the original MH code. I decided it was simplest to simply delete the buffer recycling code. ---