From da72c15dfde0587338c87a167e5f11fc90441e6d Mon Sep 17 00:00:00 2001
From: Magnus Holmgren <magnus@kibibyte.se>
Date: Tue, 25 Jun 2024 00:14:07 +0200
Subject: [PATCH] Fix missing dereference - bug with OOP_RD_NUL_DISCARD

---
 read.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/read.c b/read.c
index 38cba00..deaadb5 100644
--- a/read.c
+++ b/read.c
@@ -399,7 +399,7 @@ static void *on_process(oop_source *oop, oop_read *rd, int try_read) {
       }
       assert(rd->style.nul_mode == OOP_RD_NUL_DISCARD);
       for (notnul= nul+1;
-	   notnul < buf+thisrecsz && notnul == '\0';
+	   notnul < buf+thisrecsz && *notnul == '\0';
 	   notnul++);
       thisrecsz-= (notnul-nul);
       checked= nul-buf;
-- 
GitLab