mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
tests: Assert if ssh_get_random failed in torture_rand_thread.
Found by clang-analyzer http://test.libssh.org/clang-analyzer/
This commit is contained in:
@ -36,6 +36,7 @@ static void *torture_rand_thread(void *threadid) {
|
||||
buffer[0] = buffer[1] = buffer[10] = buffer[11] = 'X';
|
||||
for(i = 0; i < NUM_LOOPS; ++i) {
|
||||
r = ssh_get_random(&buffer[2], i % 8 + 1, 0);
|
||||
assert_true(r == 1);
|
||||
}
|
||||
|
||||
pthread_exit(NULL);
|
||||
|
Reference in New Issue
Block a user