On 1/19/2024 8:21 PM, Aon -> Al -> All wrote:
Hello all,
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 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.
There seems to be a lot of lines in Jamnntpd's code that looks similar to this. My first search for "strcpy" came up with:
strcpy(addr,&originbuf[d+1]);
Use of strcpy() in general is considered unsafe. But that's not the same issue that apam posted about (overlapping source and destination
string). The example use of strcpy() above may be fine or may not, depending on the size of the 'addr' buffer and the length string at originbuf + d + 1.
Sysop: | tracker1 |
---|---|
Location: | Phoenix, AZ |
Users: | 54 |
Nodes: | 25 (0 / 25) |
Uptime: | 132:50:12 |
Calls: | 367 |
Files: | 1,364 |
Messages: | 36,299 |