Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit PR/42646: Joachim Kuebart: Shell crashes in libe...



details:   https://anonhg.NetBSD.org/src/rev/78507bed69dd
branches:  trunk
changeset: 750965:78507bed69dd
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 20 01:15:52 2010 +0000

description:
PR/42646: Joachim Kuebart: Shell crashes in libedit when window size changes
(SIGWINCH). Return NULL if el_gets() gets interrupted.

diffstat:

 lib/libedit/eln.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r ddc8992a5b8c -r 78507bed69dd lib/libedit/eln.c
--- a/lib/libedit/eln.c Wed Jan 20 00:58:49 2010 +0000
+++ b/lib/libedit/eln.c Wed Jan 20 01:15:52 2010 +0000
@@ -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);
 }
 
 



Home | Main Index | Thread Index | Old Index