diff options
author | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2011-05-04 07:38:07 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2011-05-04 07:38:07 +0000 |
commit | fa32682a5bfdd176e582cf6128a3c40c1c0cd189 (patch) | |
tree | e53c179239dcfb65582c3bb844896b678c9f61cd /debian/patches/120_config-file-handling.patch | |
parent | Releasing debian version 0.5.2-6 (diff) | |
download | w3m-fa32682a5bfdd176e582cf6128a3c40c1c0cd189.tar.gz w3m-fa32682a5bfdd176e582cf6128a3c40c1c0cd189.zip |
Releasing debian version 0.5.2-7debian/0.5.2-7
Diffstat (limited to '')
-rw-r--r-- | debian/patches/120_config-file-handling.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/120_config-file-handling.patch b/debian/patches/120_config-file-handling.patch new file mode 100644 index 0000000..ded2c85 --- /dev/null +++ b/debian/patches/120_config-file-handling.patch @@ -0,0 +1,38 @@ +Description: Fix segfault when changing options if ~/.w3m not accessible +Origin: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=366284#5 +Author: Karsten Schoelzel <kuser@gmx.de> +Bug-Debian: http://bugs.debian.org/366284 + +diff --git a/rc.c b/rc.c +index 17f30d8..b88a3fd 100644 +--- a/rc.c ++++ b/rc.c +@@ -1253,7 +1253,7 @@ init_rc(void) + interpret_rc(f); + fclose(f); + } +- if ((f = fopen(config_file, "rt")) != NULL) { ++ if (config_file && (f = fopen(config_file, "rt")) != NULL) { + interpret_rc(f); + fclose(f); + } +@@ -1265,6 +1265,8 @@ init_rc(void) + ((tmp_dir = getenv("TMP")) == NULL || *tmp_dir == '\0') && + ((tmp_dir = getenv("TEMP")) == NULL || *tmp_dir == '\0')) + tmp_dir = "/tmp"; ++ create_option_search_table(); ++ goto open_rc; + } + + +@@ -1446,8 +1448,8 @@ panel_set_option(struct parsed_tagarg *a + FILE *f = NULL; + char *p; + +- if (no_rc_dir) { +- disp_message("There's no ~/.w3m directory... config not saved", FALSE); ++ if (config_file == NULL) { ++ disp_message("There's no config file... config not saved", FALSE); + } + else { + f = fopen(config_file, "wt"); |