]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-oauth2: Add assert to make sure json_parse_next() doesn't think istream is nonblo...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 24 Mar 2020 09:59:23 +0000 (11:59 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 27 Mar 2020 14:29:33 +0000 (14:29 +0000)
src/lib-oauth2/oauth2.c

index 5cee85cbff8c80132d7e2749a6c5e3da2738d1ec..f5edfab74080f1d3ab0e4b98660a7f1f346efdb3 100644 (file)
@@ -24,6 +24,7 @@ int oauth2_json_tree_build(const buffer_t *json, struct json_tree **tree_r,
                ret = json_tree_append(tree, type, value);
                i_assert(ret == 0);
        }
+       i_assert(ret != 0);
        ret = json_parser_deinit(&parser, error_r);
        i_stream_unref(&is);
        if (ret != 0)