commit df0fc37: [Minor] Sigh, fix crash

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Jun 23 12:28:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-06-23 13:25:37 +0100
URL: https://github.com/rspamd/rspamd/commit/df0fc37fd60c71e190a74be8222e2a007e7824cb (HEAD -> master)

[Minor] Sigh, fix crash

---
 src/libserver/html/html.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index 324695bdf..2e519e81a 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -1625,7 +1625,7 @@ html_process_input(rspamd_mempool_t *pool,
 				}
 			}
 
-			if (cur_tag->id == Tag_STYLE && !(cur_tag->flags & FL_CLOSING)) {
+			if (cur_tag && (cur_tag->id == Tag_STYLE && !(cur_tag->flags & FL_CLOSING))) {
 				state = content_style;
 			}
 			else {


More information about the Commits mailing list