536e63
From 175850b03e1af251d705c1d04b2b9b3c1c06e48f Mon Sep 17 00:00:00 2001
536e63
From: Akira TAGOH <akira@tagoh.org>
536e63
Date: Thu, 17 Feb 2022 19:06:10 +0900
536e63
Subject: [PATCH 3/3] Fix SEGV issue in fribidi_remove_bidi_marks
536e63
536e63
Escape from fribidi_remove_bidi_marks() immediately if str is null.
536e63
536e63
This fixes https://github.com/fribidi/fribidi/issues/183
536e63
---
536e63
 lib/fribidi.c | 2 +-
536e63
 1 file changed, 1 insertion(+), 1 deletion(-)
536e63
536e63
diff --git a/lib/fribidi.c b/lib/fribidi.c
536e63
index f5da0da..70bdab2 100644
536e63
--- a/lib/fribidi.c
536e63
+++ b/lib/fribidi.c
536e63
@@ -74,7 +74,7 @@ fribidi_remove_bidi_marks (
536e63
   fribidi_boolean status = false;
536e63
 
536e63
   if UNLIKELY
536e63
-    (len == 0)
536e63
+    (len == 0 || str == NULL)
536e63
     {
536e63
       status = true;
536e63
       goto out;
536e63
-- 
536e63
2.35.1
536e63