Skip to content

Commit

Permalink
ExitString is used for error exit, do the minimum necessary here.
Browse files Browse the repository at this point in the history
Avoid infinite loop:
telrcv->suboption->ExitString->SetForExit->telrcv

Reported by hacker fantastic, thanks!
  • Loading branch information
coypoop committed Dec 13, 2018
1 parent f302c7c commit 36b8cfb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions usr.bin/telnet/utilities.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 */

Expand Down Expand Up @@ -907,7 +907,6 @@ Exit(int returnCode)
void
ExitString(const char *string, int returnCode)
{
SetForExit();
fwrite(string, 1, strlen(string), stderr);
exit(returnCode);
}

0 comments on commit 36b8cfb

Please sign in to comment.