There are several functions which depend on statements like while(1). Without additional consideration, these functions are not robust and may never exit, blocking execution of the rest of the user's program. Any function with an infinite loop should have a timeout for its infinite loop. These functions should be able to indicate a timeout error state to their calling function via their return value.
The effect of infinite loop timeouts has not been tested. I'll need to create a test folder containing versions of the library with artificial delays designed to trigger the timeout in infinite loops. If timeouts work as intended, these functions should return -1.