Skip to content

Commit a3c3d63

Browse files
author
Peter McCluskey
committed
Fixed a core dump with linkquotes = 1
1 parent 8578c6d commit a3c3d63

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Changelog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Version Changes for Hypermail
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
Peter McCluskey (Mar 14, 2006)
4+
Fixed a core dump with linkquotes = 1 caused by Daigo's changes.
35

46
Peter McCluskey (Sep 30, 2005)
57
Fixed missing links at top when show_index_links is 1 or 3.

src/print.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,8 @@ static char *ConvURLsWithHrefs(const char *line, char *mailid, char *mailsubject
970970
* message is in the archive, and call ConvURLsString on the rest of the line.
971971
*/
972972

973-
static char *ConvMsgid(char *line, char *inreply, char *mailid, char *mailsubject)
973+
static char *ConvMsgid(char *line, char *inreply, char *mailid,
974+
char *mailsubject, char *charset)
974975
{
975976
char *tmpline4;
976977
int subjmatch;
@@ -988,14 +989,14 @@ static char *ConvMsgid(char *line, char *inreply, char *mailid, char *mailsubjec
988989
tmpline1 = (char *)emalloc(c - line + 1);
989990
strncpy(tmpline1, line, c - line); /* AUDIT biege: who gurantees that c-line doesnt become smaller 0? IOF? */
990991
tmpline1[c - line] = 0;
991-
tmpline4 = ConvURLsString(tmpline1, mailid, mailsubject, NULL);
992+
tmpline4 = ConvURLsString(tmpline1, mailid, mailsubject, charset);
992993
free(tmpline1);
993994
PushString(&buff, tmpline4);
994995
free(tmpline4);
995996
PushString(&buff, msg_href(ep, ep, TRUE));
996997
PushString(&buff, inreply);
997998
PushString(&buff, "</a>");
998-
tmpline4 = ConvURLsString(c + strlen(inreply), mailid, mailsubject, NULL);
999+
tmpline4 = ConvURLsString(c + strlen(inreply), mailid, mailsubject, charset);
9991000
if (tmpline4) {
10001001
PushString(&buff, tmpline4);
10011002
free(tmpline4);
@@ -1046,7 +1047,7 @@ char *ConvURLsString(char *line, char *mailid, char *mailsubject, char *charset)
10461047
if (set_linkquotes) {
10471048
char *inreply = getreply(line);
10481049
if (inreply) {
1049-
parsed = ConvMsgid(line, inreply, mailid, mailsubject);
1050+
parsed = ConvMsgid(line, inreply, mailid, mailsubject, charset);
10501051
free(inreply);
10511052
if (parsed)
10521053
return parsed;

0 commit comments

Comments
 (0)