From: Arran Cudbard-Bell Date: Sat, 14 Mar 2020 04:07:08 +0000 (-0400) Subject: unit_test_attribute: Encoding 0 bytes is an error too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42c798e99d0746e35f30902ecdc347bd40d01416;p=thirdparty%2Ffreeradius-server.git unit_test_attribute: Encoding 0 bytes is an error too At least in terms of the unit tests --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index a4aa5ac8136..21016e65d9f 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -1188,7 +1188,7 @@ static size_t command_decode_pair(command_result_t *result, command_ctx_t *cc, while (to_dec < to_dec_end) { slen = tp->func(cc->tmp_ctx, &cursor, cc->active_dict ? cc->active_dict : cc->config->dict, (uint8_t *)to_dec, (to_dec_end - to_dec), decoder_ctx); - if (slen < 0) { + if (slen <= 0) { fr_pair_list_free(&head); CLEAR_TEST_POINT(cc); RETURN_OK_WITH_ERROR();