forked from wolfSSL/wolfssl
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:
@@ -18391,6 +18391,11 @@ static void test_wolfSSL_ERR_put_error(void)
|
|||||||
/* Empty and free up all error nodes */
|
/* Empty and free up all error nodes */
|
||||||
ERR_clear_error();
|
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);
|
printf(resultFmt, passed);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user