Martin Neitzel | 8 Mar 17:05 2007
Picon

nail core dumps on smime signing / folder removal (fix included)

nail has a small "y/n" questionaire utility which will segfault
when the user just hits return.

Repeat-by:
	Either		"set asksign", compose a msg, just hit return
	or		"remove /etc/motd",  just hit return

These are all places which call yorn() and can therfore trigger the bug.
The patch below will guard against this.

							Martin

Index: tty.c
===================================================================
RCS file: /cvsroot/nail/nail/tty.c,v
retrieving revision 1.10
diff -u -r1.10 tty.c
--- tty.c	4 Mar 2006 00:32:16 -0000	1.10
+++ tty.c	8 Mar 2007 16:01:39 -0000
 <at>  <at>  -430,6 +430,6  <at>  <at> 
 		return 1;
 	do
 		cp = readtty(msg, NULL);
-	while (*cp != 'y' && *cp != 'Y' && *cp != 'n' && *cp != 'N');
+	while (!cp || *cp != 'y' && *cp != 'Y' && *cp != 'n' && *cp != 'N');
 	return *cp == 'y' || *cp == 'Y';
 }

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
(Continue reading)

Gunnar Ritter | 9 Mar 00:18 2007
Picon

Re: nail core dumps on smime signing / folder removal (fix included)

Martin Neitzel <neitzel@...> wrote:

> nail has a small "y/n" questionaire utility which will segfault
> when the user just hits return.
>
> Repeat-by:
> 	Either		"set asksign", compose a msg, just hit return
> 	or		"remove /etc/motd",  just hit return
>
> These are all places which call yorn() and can therfore trigger the bug.
> The patch below will guard against this.

Thank you. I have applied the fix in the CVS repository.

	Gunnar

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Gmane