Hello everyone,

I noticed an integer overflow issue at line 39 of specfunc/pow_int.c.
Basically, when n is INT_MIN, the negation of n is undefined, which future
causes the right shift operation at line 56 undefined. In reality, having n
being INT_MIN causes non termination. For example, the following program
will loop forever.

```
#include <limits.h>
#include <gsl/gsl_sf_pow_int.h>
#include <assert.h>

int main() {
  assert(gsl_sf_pow_int(1.0, INT_MIN) == 1.0);
  return 0;
}
```

Shaobo

Reply via email to