diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index ad71a7e6b205..889a70d5fc8d 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2007-03-08 Daniel Franke + + PR fortran/30947 + * intrinsics/signal.c (alarm_sub_int): Avoid SEGFAULT with + integer arguments. + 2007-03-04 Thomas Koenig PR libfortran/30981 diff --git a/libgfortran/intrinsics/signal.c b/libgfortran/intrinsics/signal.c index e912c90780eb..2c2f38d2969f 100644 --- a/libgfortran/intrinsics/signal.c +++ b/libgfortran/intrinsics/signal.c @@ -170,14 +170,14 @@ alarm_sub_int (int *seconds, int *handler, int *status) #if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL) if (status != NULL) { - if (signal (SIGALRM, (void (*)(int)) handler) == SIG_ERR) + if (signal (SIGALRM, (void (*)(int)) *handler) == SIG_ERR) *status = -1; else *status = alarm (*seconds); } else { - signal (SIGALRM, (void (*)(int)) handler); + signal (SIGALRM, (void (*)(int)) *handler); alarm (*seconds); } #else