9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Pietro Gagliardi <pietro10@mac.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] sshserve.c
Date: Tue, 15 Apr 2008 18:29:38 -0400	[thread overview]
Message-ID: <D4577BBF-4E57-4C91-AE3A-51586C315028@mac.com> (raw)
In-Reply-To: <EAF5F709-3150-4FAC-8BE9-8E476789A246@ar.aichi-u.ac.jp>

Yup. usage() is calling itself with no termination condition - and
what's more, it is tail recursing. It should be

	void
	usage(void)
	{
		fprint(2, "usage: sshserve [-A authlist] [-c cipherlist] client-ip-
address\n");
		exits("usage");
	}

to keep with the Plan 9 program. Enjoy!

When this QEMU-on-Leopard-freezes-randomly bug gets fixed, I can fix
it and any other dangers.

On Apr 15, 2008, at 6:05 PM, Kenji Arisawa wrote:

> Hello,
>
> In sshserve.c:
>
> void
> usage(void)
> {
> 	fprint(2, "usage: sshserve [-A authlist] [-c cipherlist] client-ip-
> address\n");
> 	usage();
> }
>
> This code can make endless loop. Right?
>
> Kenji Arisawa
>
>



  reply	other threads:[~2008-04-15 22:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-15 22:05 Kenji Arisawa
2008-04-15 22:29 ` Pietro Gagliardi [this message]
2008-04-15 22:34   ` john
2008-04-15 22:35     ` erik quanstrom
2008-04-15 23:14       ` john
2008-04-15 23:17         ` erik quanstrom
2008-04-15 23:31           ` Roman V. Shaposhnik
2008-04-15 22:40     ` Pietro Gagliardi
2008-04-15 23:11   ` Kenji Arisawa
2008-04-16  2:29     ` Russ Cox
2008-04-16  3:30       ` Bruce Ellis
2008-04-16 12:12         ` Pietro Gagliardi
2008-04-16 12:35           ` Bruce Ellis
2008-04-18 18:00       ` Steve Simon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D4577BBF-4E57-4C91-AE3A-51586C315028@mac.com \
    --to=pietro10@mac.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).