From 21490752679f13208680f58b1637bd53887eb8e5 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Mon, 28 Sep 2020 07:31:15 -0700 Subject: [PATCH] Use body->len as the only authoritative way to check if the provided body is empty or not. (cherry picked from commit b0997b1fb56d6f518a26b9fe32e45cb16b9a0284) (cherry picked from commit bd5a1d027b238892d798e5c3fc0d0633387192fe) --- parser/parse_authenticate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/parse_authenticate.c b/parser/parse_authenticate.c index b4f7ed7c0c9..70c281a58b4 100644 --- a/parser/parse_authenticate.c +++ b/parser/parse_authenticate.c @@ -94,7 +94,7 @@ int parse_authenticate_body( str *body, struct authenticate_body *auth) str val; int quoted_val; - if (body->s==0 || *body->s==0 ) + if (body->len == 0) { LM_ERR("empty body\n"); goto error;