From b7dde2bc4bffda277a2079f23c2a920734d73ad5 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Sun, 4 Aug 2013 11:24:54 +0900 Subject: Fix segfault of loadGeneralFile() Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718612 --- file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 22b76d9..b342de0 100644 --- a/file.c +++ b/file.c @@ -2267,10 +2267,11 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer, if (header_string) header_string = NULL; #ifdef USE_NNTP - if (f.scheme == SCM_NNTP || f.scheme == SCM_NEWS) + if (b && b != NO_BUFFER && (f.scheme == SCM_NNTP || f.scheme == SCM_NEWS)) reAnchorNewsheader(b); #endif - preFormUpdateBuffer(b); + if (b && b != NO_BUFFER) + preFormUpdateBuffer(b); TRAP_OFF; return b; } -- cgit v1.2.3