Module Name: src Committed By: christos Date: Wed Jan 20 01:15:52 UTC 2010
Modified Files: src/lib/libedit: eln.c Log Message: PR/42646: Joachim Kuebart: Shell crashes in libedit when window size changes (SIGWINCH). Return NULL if el_gets() gets interrupted. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libedit/eln.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/eln.c diff -u src/lib/libedit/eln.c:1.5 src/lib/libedit/eln.c:1.6 --- src/lib/libedit/eln.c:1.5 Tue Jan 19 17:38:08 2010 +++ src/lib/libedit/eln.c Tue Jan 19 20:15:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: eln.c,v 1.5 2010/01/19 22:38:08 christos Exp $ */ +/* $NetBSD: eln.c,v 1.6 2010/01/20 01:15:52 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: eln.c,v 1.5 2010/01/19 22:38:08 christos Exp $"); +__RCSID("$NetBSD: eln.c,v 1.6 2010/01/20 01:15:52 christos Exp $"); #endif /* not lint && not SCCSID */ #include "histedit.h" @@ -72,10 +72,12 @@ public const char * el_gets(EditLine *el, int *nread) { + const wchar_t *tmp; + el->el_flags |= IGNORE_EXTCHARS; - el_wgets(el, nread); + tmp = el_wgets(el, nread); el->el_flags &= ~IGNORE_EXTCHARS; - return ct_encode_string(el->el_line.buffer, &el->el_lgcyconv); + return ct_encode_string(tmp, &el->el_lgcyconv); }