1
0

patch-rfc931_c 832 B

1234567891011121314151617181920212223242526272829
  1. --- tcp_wrappers_7.6.orig/rfc931.c 1995-01-02 16:11:34.000000000 +0100
  2. +++ tcp_wrappers_7.6/rfc931.c 2009-06-05 18:45:03.000000000 +0200
  3. @@ -33,7 +33,7 @@ static char sccsid[] = "@(#) rfc931.c 1.
  4. int rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */
  5. -static jmp_buf timebuf;
  6. +static sigjmp_buf timebuf;
  7. /* fsocket - open stdio stream on top of socket */
  8. @@ -62,7 +62,7 @@ int protocol;
  9. static void timeout(sig)
  10. int sig;
  11. {
  12. - longjmp(timebuf, sig);
  13. + siglongjmp(timebuf, sig);
  14. }
  15. /* rfc931 - return remote user name, given socket structures */
  16. @@ -99,7 +99,7 @@ char *dest;
  17. * Set up a timer so we won't get stuck while waiting for the server.
  18. */
  19. - if (setjmp(timebuf) == 0) {
  20. + if (sigsetjmp(timebuf,1) == 0) {
  21. signal(SIGALRM, timeout);
  22. alarm(rfc931_timeout);