From 3a4d1bea61cb20dd4c00902dfff7a403af19f965 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 17 Apr 2019 15:08:42 +0200 Subject: [PATCH] BUG/MEDIUM: htx: Don't return the start-line if the HTX message is empty In the function htx_get_stline(), NULL must be returned if the HTX message doesn't contain any element. This patch must be backported to 1.9. --- include/common/htx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/htx.h b/include/common/htx.h index 9cbc95300..cd7db0526 100644 --- a/include/common/htx.h +++ b/include/common/htx.h @@ -280,7 +280,7 @@ static inline struct htx_sl *htx_get_stline(struct htx *htx) { struct htx_sl *sl = NULL; - if (htx->sl_off != -1) + if (htx->used && htx->sl_off != -1) sl = ((void *)htx->blocks + htx->sl_off); return sl; -- 2.47.3