Added test case for scenario where error is pushed, cleared then try to get current. Without fix to clear wc_current_node
in wc_ClearErrorNodes
this causes access to invalid/free'd memory.
This commit is contained in:
parent
1bf7cad633
commit
6e629a51f8
@ -18391,6 +18391,11 @@ static void test_wolfSSL_ERR_put_error(void)
|
||||
/* Empty and free up all error nodes */
|
||||
ERR_clear_error();
|
||||
|
||||
/* Verify all nodes are cleared */
|
||||
ERR_put_error(0,SYS_F_ACCEPT, 0, "this file", 0);
|
||||
ERR_clear_error();
|
||||
AssertIntEQ(ERR_get_error_line(&file, &line), 0);
|
||||
|
||||
printf(resultFmt, passed);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user