On 1/22/2024 10:18 AM, Jay Harris -> Tommi Koivula wrote:
JH> On Mon, 22 Jan 2024 08:41:38 +0200
JH> "Tommi Koivula -> Jay Harris" <0@360.221.2> wrote:
TK>> On 21.01.2024 13:21, Jay Harris wrote:
JH>>>>> @MSGID: 1:229/664 65abf652
JH>>>>> @PID: JamNNTPd/Linux 1.3
JH>>>>> @CHRS: UTF-8 4
TK>> 32bit linux? Must be if it works. :)
JH> Compiled on 32bit Linux, running on 64bit.
Didn't you say you were still having issues with the FROM field not displaying properly in your newsreader?
I've been studying this. It's pretty funny that there is no problems in TK>> my OS/2 Jamnntpd. Yesterday I did more research of the code, and in
nntpserv.c I commented out the line:
// strcpy(mimefrom,&mimefrom[6]);
Compiled in 64bit Ubuntu (22.04.3) with -m32, and it seems to work. For TK>> now. :)
Also it depends on the news client how it shows the "From:" in the
message list. Pretty weird. :D
Awesome, thank you! This makes Claws Mail look a little cleaner:
https://ibb.co/LSf6tt7
And NewsTap still looks good as well.
I've been studying this. It's pretty funny that there is no problems[...]
in my OS/2 Jamnntpd. Yesterday I did more research of the code, and in nntpserv.c I commented out the line:
// strcpy(mimefrom,&mimefrom[6]);
I've been studying this. It's pretty funny that there is no
problems in my OS/2 Jamnntpd. Yesterday I did more research of
the code, and in nntpserv.c I commented out the line:
// strcpy(mimefrom,&mimefrom[6]);[...]
I think that you have found the source of text corruption problems
in Smapi/JamNNTPd: it may not be safe to use strcpy that way.
I think that you have found the source of text corruption problems
in Smapi/JamNNTPd: it may not be safe to use strcpy that way.
Wow..!
Could it be also the reason why there are no text corruption problems
in my OS/2 version of jamnntpd which is compiled with ancient gcc3 ?
I think that you have found the source of text corruption
problems in Smapi/JamNNTPd: it may not be safe to use strcpy
that way.
Wow..!
Could it be also the reason why there are no text corruption
problems in my OS/2 version of jamnntpd which is compiled with
ancient gcc3 ?
I think so. I don't have those problems when compiling with MinGW
for Win32, either. It seems it depends on how each compiler
implements the strcpy function.
This may be a possible way to fix the corrupted From field in
headers: in nntpserv.c, instead of just removing this line:
strcpy(mimefrom,&mimefrom[6]);
Replace it by:
memmove(mimefrom,mimefrom+6,strlen(mimefrom)-5);
There could also be issues with the Subject field. The next line:
strcpy(mimesubj,&mimesubj[9]);
could be changed to:
memmove(mimesubj,mimesubj+9,strlen(mimesubj)-8);
As for the corruption in the body of messages posted with
newsreaders that support flowed text (like Thunderbird), I think it
may be fixed by changing this:
strcpy(line,&line[1]);
to this:
memmove(line,line+1,strlen(line));
This may be a possible way to fix the corrupted From field in headers:
in nntpserv.c, instead of just removing this line:
strcpy(mimefrom,&mimefrom[6]);
Replace it by:
memmove(mimefrom,mimefrom+6,strlen(mimefrom)-5);
There could also be issues with the Subject field. The next line:
strcpy(mimesubj,&mimesubj[9]);
could be changed to:
memmove(mimesubj,mimesubj+9,strlen(mimesubj)-8);
As for the corruption in the body of messages posted with newsreaders
that support flowed text (like Thunderbird), I think it may be fixed by changing this:
strcpy(line,&line[1]);
to this:
memmove(line,line+1,strlen(line));
These patches are for both JamNNTPd and SmapiNNTPd.
This may be a possible way to fix the corrupted From field in headers:
in nntpserv.c, instead of just removing this line:
strcpy(mimefrom,&mimefrom[6]);
Replace it by:
memmove(mimefrom,mimefrom+6,strlen(mimefrom)-5);
There could also be issues with the Subject field. The next line:
strcpy(mimesubj,&mimesubj[9]);
could be changed to:
memmove(mimesubj,mimesubj+9,strlen(mimesubj)-8);
As for the corruption in the body of messages posted with newsreaders
that support flowed text (like Thunderbird), I think it may be fixed by changing this:
strcpy(line,&line[1]);
to this:
memmove(line,line+1,strlen(line));
These patches are for both JamNNTPd and SmapiNNTPd.
To prevent other potential problems, it is also convenient to do these other modifications in nntpserv.c:Thanks Carlos, I have these modifications in place here. I'll let you know how it goes.
Change every occurrence (there are 3) of:
strcpy(article,&article[1]);
to:
memmove(article,article+1,strlen(article));
Change:
strcpy(from,&from[1]);
to:
memmove(from,from+1,strlen(from));
Change:
strcpy(subject,&subject[4]);
to:
memmove(subject,subject+4,strlen(subject)+3);
And change:
strcpy(text,&text[c]);
to:
memmove(text,text+c,strlen(text)+c-1);
Carlos
To prevent other potential problems, it is also convenient to do these other modifications in nntpserv.c:[...]
Change:
strcpy(subject,&subject[4]);
to:
memmove(subject,subject+4,strlen(subject)+3);
And change:
strcpy(text,&text[c]);
to:
memmove(text,text+c,strlen(text)+c-1);
Thanks Carlos, I have these modifications in place here. I'll let you know how it goes.
Sorry I made a couple typos. Check my previous message.
Sorry guys.
Sorry I made a couple typos. Check my previous message.
Updated. Thank you. Doesn't seem like it broke anything during the
time it was wrong, so we can just pretend that never happened. ;)
27 Jan 2024 20:23:35 +0100 Carlos Navarro -> Tommi Koivula:
This may be a possible way to fix the corrupted From field in headers:
in nntpserv.c, instead of just removing this line:
strcpy(mimefrom,&mimefrom[6]);
Replace it by:
memmove(mimefrom,mimefrom+6,strlen(mimefrom)-5);
There could also be issues with the Subject field. The next line:
strcpy(mimesubj,&mimesubj[9]);
could be changed to:
memmove(mimesubj,mimesubj+9,strlen(mimesubj)-8);
As for the corruption in the body of messages posted with newsreaders
that support flowed text (like Thunderbird), I think it may be fixed by
changing this:
strcpy(line,&line[1]);
to this:
memmove(line,line+1,strlen(line));
These patches are for both JamNNTPd and SmapiNNTPd.
Hello Carlos,
On Mon, 5 Feb 2024 03:36:48 +0100, you wrote:
27 Jan 2024 20:23:35 +0100 Carlos Navarro -> Tommi Koivula:
This may be a possible way to fix the corrupted From field in
headers: in nntpserv.c, instead of just removing this line:
strcpy(mimefrom,&mimefrom[6]);
Replace it by:
memmove(mimefrom,mimefrom+6,strlen(mimefrom)-5);
There could also be issues with the Subject field. The next line:
strcpy(mimesubj,&mimesubj[9]);
could be changed to:
memmove(mimesubj,mimesubj+9,strlen(mimesubj)-8);
As for the corruption in the body of messages posted with
newsreaders that support flowed text (like Thunderbird), I think
it may be fixed by changing this:
strcpy(line,&line[1]);
to this:
memmove(line,line+1,strlen(line));
These patches are for both JamNNTPd and SmapiNNTPd.
Another reply to the same message, with another utf-8 editor. Does this one look
better to you Wilfred and Tommi?
27 Jan 2024 20:23:35 +0100 Carlos Navarro -> Tommi Koivula:
This may be a possible way to fix the corrupted From field in
headers: in nntpserv.c, instead of just removing this line:
strcpy(mimefrom,&mimefrom[6]);
Replace it by:
memmove(mimefrom,mimefrom+6,strlen(mimefrom)-5);
There could also be issues with the Subject field. The next line:
strcpy(mimesubj,&mimesubj[9]);
could be changed to:
memmove(mimesubj,mimesubj+9,strlen(mimesubj)-8);
As for the corruption in the body of messages posted with newsreaders
that support flowed text (like Thunderbird), I think it may be fixed
by changing this:
strcpy(line,&line[1]);
to this:
memmove(line,line+1,strlen(line));
These patches are for both JamNNTPd and SmapiNNTPd.
Another reply to the same message, with another utf-8 editor. Does this one
look better to you Wilfred and Tommi?
Hello Carlos,
On Mon, 5 Feb 2024 03:36:48 +0100, you wrote:
27 Jan 2024 20:23:35 +0100 Carlos Navarro -> Tommi Koivula:
This may be a possible way to fix the corrupted From field in
headers: in nntpserv.c, instead of just removing this line:
strcpy(mimefrom,&mimefrom[6]);
Replace it by:
memmove(mimefrom,mimefrom+6,strlen(mimefrom)-5);
There could also be issues with the Subject field. The next line:
strcpy(mimesubj,&mimesubj[9]);
could be changed to:
memmove(mimesubj,mimesubj+9,strlen(mimesubj)-8);
As for the corruption in the body of messages posted with
newsreaders that support flowed text (like Thunderbird), I think
it may be fixed by changing this:
strcpy(line,&line[1]);
to this:
memmove(line,line+1,strlen(line));
These patches are for both JamNNTPd and SmapiNNTPd.
Another reply to the same message, with another utf-8 editor. Does
this one look better to you Wilfred and Tommi?
Another reply using Claws Mail. How about this one?
Just trying to narrow down if it's Thunderbird itself, or jamnntpd.. so I know where to look.
Another reply to the same message, with another utf-8 editor. Does this one look better to you Wilfred and Tommi?
Regards,
Nick
... Take my advice, I don't use it anyway.
--- slrn/pre1.0.4-9 (Linux)
Another reply to the same message, with another utf-8 editor. Does
this one look better to you Wilfred and Tommi?
Another reply using Claws Mail. How about this one?
Just trying to narrow down if it's Thunderbird itself, or jamnntpd..
so I know where to look.
.. "Take my advice, I don't use it anyway."
--- Claws Mail 4.2.0 (GTK 3.24.38; x86_64-w64-mingw32)
Another reply to the same message, with another utf-8 editor.
Does this one look better to you Wilfred and Tommi?
Looks fine with slrn!
Looks fine with slrn!
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 991 |
Nodes: | 10 (1 / 9) |
Uptime: | 123:33:10 |
Calls: | 12,960 |
Calls today: | 2 |
Files: | 186,574 |
Messages: | 3,265,785 |