Commit 9a85b9aa 9a85b9aa8fe0e9de86801fa75eb276cca78421e7 by Sergey Poznyakoff

parse822_word(): Additional check for qstr != NULL:

parse822_quoted_string() sometimes returns EOK and does not fill
qstr (e.g. when parsing empty string: "")
1 parent 47546d96
......@@ -498,7 +498,7 @@ int parse822_word(const char** p, const char* e, char** word)
{
char* qstr = 0;
if((rc = parse822_quoted_string(p, e, &qstr)) == EOK) {
if((rc = parse822_quoted_string(p, e, &qstr)) == EOK && qstr) {
rc = str_append(word, qstr);
str_free(&qstr);
......