[comp.windows.x] xhost critical region

dale@boing.UUCP (Dale Luck) (10/11/89)

While eyeballing the xhost code:

1:	signal(SIGALRM, nameserver_lost);
2:	alarm(4);
3:	if (setjmp(env) == 0) {
		...


and:

nameserver_lost()
{
  nameserver_timedout = 1;
  longjmp(env, -1);
}

It appears to me that if it takes longer than 4 seconds to get from
line 2 to line 3 then xhost will blow up as it tries to longjmp through
an uninitialized env structure.

Dale Luck
-- 
Dale Luck     GfxBase/Boing, Inc.
{uunet!cbmvax|pyramid}!amiga!boing!dale