aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-11-30 10:30:07 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-11-30 10:30:07 +0000
commitd7b46cd16f96014063ceac61802ed6e23738476f (patch)
treed4406a076057d21cf9f86023f35aa59ed571c658
parent[w3m-dev 02595] (diff)
downloadw3m-d7b46cd16f96014063ceac61802ed6e23738476f.tar.gz
w3m-d7b46cd16f96014063ceac61802ed6e23738476f.zip
[w3m-dev 02596]
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
-rw-r--r--ChangeLog5
-rw-r--r--file.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c8a8b6..9a8b3df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 02596]
+ * file.c (acceptableEncoding): fix segfault if no decoder found
+
2001-11-30 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev 02595]
diff --git a/file.c b/file.c
index fb478ae..13153d2 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.22 2001/11/30 10:27:32 ukai Exp $ */
+/* $Id: file.c,v 1.23 2001/11/30 10:30:07 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -401,10 +401,9 @@ acceptableEncoding()
pushText(l, d->encoding);
}
}
+ encodings = Strnew();
while ((p = popText(l)) != NULL) {
- if (encodings == NULL)
- encodings = Strnew();
- else
+ if (encodings->length)
Strcat_charp(encodings, ", ");
Strcat_charp(encodings, p);
}