Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/telnet ExitString is used for error exit, do the min...



details:   https://anonhg.NetBSD.org/src/rev/9b1e6d6c2533
branches:  trunk
changeset: 446643:9b1e6d6c2533
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Dec 13 05:15:11 2018 +0000

description:
ExitString is used for error exit, do the minimum necessary here.
Avoid infinite loop:
telrcv->suboption->ExitString->SetForExit->telrcv

Reported by hacker fantastic, thanks!

diffstat:

 usr.bin/telnet/utilities.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r c0a2846e51b6 -r 9b1e6d6c2533 usr.bin/telnet/utilities.c
--- a/usr.bin/telnet/utilities.c        Thu Dec 13 05:07:03 2018 +0000
+++ b/usr.bin/telnet/utilities.c        Thu Dec 13 05:15:11 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: utilities.c,v 1.26 2018/12/13 05:07:03 maya Exp $      */
+/*     $NetBSD: utilities.c,v 1.27 2018/12/13 05:15:11 maya Exp $      */
 
 /*
  * Copyright (c) 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)utilities.c        8.3 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: utilities.c,v 1.26 2018/12/13 05:07:03 maya Exp $");
+__RCSID("$NetBSD: utilities.c,v 1.27 2018/12/13 05:15:11 maya Exp $");
 #endif
 #endif /* not lint */
 
@@ -907,7 +907,6 @@
 void
 ExitString(const char *string, int returnCode)
 {
-    SetForExit();
     fwrite(string, 1, strlen(string), stderr);
     exit(returnCode);
 }



Home | Main Index | Thread Index | Old Index