Hello all,
Testing Jamnntpd on 64bit Linux. The From field is still wonky.
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. ;(
211 10 1 0 NNNTPTEST Group selected< XOVER 1-10
224 Overvew iinformation follows
1 Test ""Wde -> Al -> All" <unknown>
2 Test2 ""Wde -> Al -> All" <unknown>
3 Test3 ""Wde -> Al -> All" <unknown>
4 Test4 ""Jris -> As -> All" <0@664.229.1>
Path: JamNTPdd!not-for-mail
From: "Acessiion -> Accession" <0@200.1.21>
X-CommentTo: Accession
Newsgroup: fssx_tst
Subject: ot aa test
Date: Fri 19 Jan 2024 21:03:0 --0600
Message-I: <11003$fsx_tst@JamNNTPd>
Reference: <11001$fsx_tst@JamNNTPd>
X-JAM-Fro: Acccession <21:1/200.0>
X-JAM-To:Acceession
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. ;(
It looks like it might get that info when reading the headers of the messages from XOVER:
https://ibb.co/bzyLPxd
< GROUP NNTPTEST
211 10 1 0 NNNTPTEST Group selected< XOVER 1-10
224 Overvew iinformation follows
1 Test ""Wde -> Al -> All" <unknown>
2 Test2 ""Wde -> Al -> All" <unknown>
3 Test3 ""Wde -> Al -> All" <unknown>
4 Test4 ""Jris -> As -> All" <0@664.229.1>
But the actual From line looks ok:
Path: JamNTPdd!not-for-mail
From: "Acessiion -> Accession" <0@200.1.21>
X-CommentTo: Accession
Newsgroup: fssx_tst
Subject: ot aa test
Date: Fri 19 Jan 2024 21:03:0 --0600
Message-I: <11003$fsx_tst@JamNNTPd>
Reference: <11001$fsx_tst@JamNNTPd>
X-JAM-Fro: Acccession <21:1/200.0>
X-JAM-To:Acceession
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.
strcpy(subject, &subject[4])
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]);
; a> strcpy(subject, &subject[4])
; 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]);
That might be ok, the problem was if it's copying the same buffer into itself, if they're different buffers it should be ok.
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: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,043 |
Nodes: | 16 (0 / 16) |
Uptime: | 90:58:15 |
Calls: | 500,954 |
Calls today: | 3 |
Files: | 109,377 |
D/L today: |
1,291 files (249M bytes) |
Messages: | 304,702 |