From b9744906025024667c8072e9f6aca9e96c423139 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Fri, 8 Feb 2002 11:18:10 +0000 Subject: [w3m-dev 03011] segmentation fault on tag without
* file.c (process_input): tmp initialization fix From: Tsutomu Okada --- ChangeLog | 7 ++++++- file.c | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7fc4abe..6c1aa02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-02-08 Tsutomu Okada + + * [w3m-dev 03011] segmentation fault on tag without + * file.c (process_input): tmp initialization fix + 2002-02-07 Hironori Sakamoto * [emacs-w3m:02733] for emacs-w3m better rendering with inline image @@ -2870,4 +2875,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.306 2002/02/07 14:44:47 ukai Exp $ +$Id: ChangeLog,v 1.307 2002/02/08 11:18:10 ukai Exp $ diff --git a/file.c b/file.c index c3f6ebc..eddbc12 100644 --- a/file.c +++ b/file.c @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.68 2002/02/07 14:16:00 ukai Exp $ */ +/* $Id: file.c,v 1.69 2002/02/08 11:18:10 ukai Exp $ */ #include "fm.h" #include #include "myctype.h" @@ -3073,7 +3073,7 @@ process_input(struct parsed_tag *tag) { int i, w, v, x, y, z, iw, ih; char *q, *p, *r, *p2, *s; - Str tmp = Strnew(); + Str tmp = NULL; char *qq = ""; int qlen = 0; @@ -3081,6 +3081,8 @@ process_input(struct parsed_tag *tag) char *s = ""; tmp = process_form(parse_tag(&s, TRUE)); } + if (tmp == NULL) + tmp = Strnew(); p = "text"; parsedtag_get_value(tag, ATTR_TYPE, &p); -- cgit v1.2.3