Subj : Not a test To : apam From : Digital Man Date : Sat Mar 02 2024 01:38 pm Re: Not a test By: apam to Accession on Sat Jan 20 2024 06:36 pm > > On 1/19/2024 8:21 PM, Aon -> Al -> All wrote: > > > A> Hello all, > > > A> Testing Jamnntpd on 64bit Linux. The From field is still wonky. > > > Seems everything else works, except "Aon -> Al -> All" is also what > > appears in my From field now in Thunderbird. > > > I only see "%s -> %s" at two locations in nntpserv.c. So I have no idea > > where that's coming from. ;( > > > One thing I noticed when I was using some stuff that did something similar > (Crashmail2 when I was working on Magicka) Is who ever wrote it made some > assumptions about how the C library copied strings, which turned out not to > be true anymore. > > The specific bug I think (and it was a long time ago) was something along > the lines of > > strcpy(subject, &subject[4]) It's illegal for the source and destination strings (arguments to strcpy) to overlap. > It was to do with stripping the (Re: from the start of messages), it > expected strcpy to copy one character at a time sequentially. > > The fix I used was to just: > > char *subj_copy = strdup(&subject[4]); > > strcpy(subject, subj_copy); > > free(subj_copy) > > > I don't know it it will help you with JamNNTP but, I wouldn't be suprised if > they used some "clever" tricks like that. Or use memmove() instead (where the source and destination may overlap). -- digital man (rob) Sling Blade quote #16: Karl Childers (to Doyle, re: lawn mower blade): I aim to kill you with it. Mmm. Norco, CA WX: 56.6øF, 82.0% humidity, 9 mph SW wind, 0.05 inches rain/24hrs .