1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-06 03:50:08 +02:00

avoid a deadlock in the saxparser

This commit is contained in:
B. Petersen 2018-06-29 15:16:33 +02:00
parent 64b13391d6
commit e1e649dc8d
2 changed files with 17 additions and 1 deletions

View file

@ -36,6 +36,7 @@ $ valgrind --leak-check=full --tool=memcheck ./deltachat-core <db>
#include "../src/dc_apeerstate.h"
#include "../src/dc_aheader.h"
#include "../src/dc_keyring.h"
#include "../src/dc_saxparser.h"
/* some data used for testing
@ -174,6 +175,16 @@ static const char* s_em_setupfile =
void stress_functions(dc_context_t* context)
{
/* test dc_saxparser_t
**************************************************************************/
{
dc_saxparser_t saxparser;
dc_saxparser_init(&saxparser, NULL);
dc_saxparser_parse(&saxparser, "<tag attr=val="); // should not crash or cause a deadlock
dc_saxparser_parse(&saxparser, "<tag attr=\"val\"="); // should not crash or cause a deadlock
}
/* test dc_simplify_t and dc_saxparser_t (indirectly used by dc_simplify_t)
**************************************************************************/