You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The following code checks that strtol doesn't read a negative number from the environment variable.
What the code should really do is check that ((int16_t) nthreads) > 0. That is, strtol could read in 65535, which is a non-negative long number. Then, the (highlighted) cast to an int16_t would interpret this as -1.
To Reproduce
Set BLOSC_NTHREADS environment variable to 65535.
System information:
OS: macOS
Compiler: Clang
Version: 16
The text was updated successfully, but these errors were encountered:
Describe the bug
The following code checks that
strtol
doesn't read a negative number from the environment variable.What the code should really do is check that
((int16_t) nthreads) > 0
. That is,strtol
could read in65535
, which is a non-negativelong
number. Then, the (highlighted) cast to anint16_t
would interpret this as-1
.To Reproduce
Set
BLOSC_NTHREADS
environment variable to65535
.System information:
The text was updated successfully, but these errors were encountered: