Skip to content

Commit

Permalink
fix "Re:" not removed from empty subjects
Browse files Browse the repository at this point in the history
issue found by Nicholas Boel
  • Loading branch information
cnb committed May 8, 2024
1 parent 0896df5 commit bd10265
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/nntpserv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2305,8 +2305,11 @@ void command_post(struct var *var)

/* Strip Re: */

if(!cfg_nostripre && (strncmp(subject,"Re: ",4)==0 || strcmp(subject,"Re:")==0))
memmove(subject,subject+4,strlen(subject)-3);
if(!cfg_nostripre)
{
if(strncmp(subject,"Re: ",4)==0) memmove(subject,subject+4,strlen(subject)-3);
else if(strcmp(subject,"Re:")==0) subject[0]=0;
}

/* Truncate strings */

Expand Down
2 changes: 1 addition & 1 deletion src/nntpserv.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct var
#define CRLF CR LF

#define SERVER_NAME "JamNNTPd/" PLATFORM_NAME
#define SERVER_VERSION "1.4-c beta 3"
#define SERVER_VERSION "1.4-c beta 4"
#define SERVER_PIDVERSION SERVER_VERSION

#define SOCKIO_TIMEOUT 5*60
Expand Down

0 comments on commit bd10265

Please sign in to comment.