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