aboutsummaryrefslogtreecommitdiff
path: root/src/news.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-04 07:05:52 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-04 07:05:52 +0000
commitbdcba0877a6b870e40dcca384ef08be78fd0e74e (patch)
treec65bebfd067e3aaea7f9614443670b3ddee0b543 /src/news.c
parenta80cf7559e18da4e89fae15c2ff10966b1983ffa (diff)
fixed a buffer overflow bug.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@145 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/news.c')
-rw-r--r--src/news.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/news.c b/src/news.c
index 8d1622bb..c65f803c 100644
--- a/src/news.c
+++ b/src/news.c
@@ -911,7 +911,6 @@ static GSList *news_get_uncached_articles(NNTPSession *session,
static MsgInfo *news_parse_xover(const gchar *xover_str)
{
MsgInfo *msginfo;
- gchar buf[NNTPBUFSIZE];
gchar *subject, *sender, *size, *line, *date, *msgid, *ref, *tmp;
gchar *p;
gint num, size_int, line_int;
@@ -944,12 +943,10 @@ static MsgInfo *news_parse_xover(const gchar *xover_str)
msginfo->date = g_strdup(date);
msginfo->date_t = procheader_date_parse(NULL, date, 0);
- conv_unmime_header(buf, sizeof(buf), sender, NULL);
- msginfo->from = g_strdup(buf);
- msginfo->fromname = procheader_get_fromname(buf);
+ msginfo->from = conv_unmime_header(sender, NULL);
+ msginfo->fromname = procheader_get_fromname(msginfo->from);
- conv_unmime_header(buf, sizeof(buf), subject, NULL);
- msginfo->subject = g_strdup(buf);
+ msginfo->subject = conv_unmime_header(subject, NULL);
extract_parenthesis(msgid, '<', '>');
remove_space(msgid);