From 3bf95b91f0cd378c1a4e9c611a51cb9fe0e2ffcd Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 19 Mar 2022 01:20:57 +0100 Subject: 49870: Fix NULL reference in match code more This reverts "49658: Fix NULL reference in match code." and adds a check inside the block, as well as a failsafe check at the end. The above commit (49658) causes a crash due to ll being calculated as 0 which leads to rr being an invalid pointer. Only adding a check for when ll is 0 just leads to bck-i-search pattern not working at all (the final hunk). Restoring the condition and adding an explicit NULL check for replstr seems to make matters work as intended. --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 4b02f3bc8..3b7cc4921 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,8 @@ * 49915: Src/Zle/comp.h, Src/Zle/compcore.c: Efficient dedup for unsorted completions + * 49870: Src/glob.c: Fix NULL reference in match code more + 2022-03-29 Bart Schaefer * 49918: NEWS, README: Update for 49917 and 49911. -- cgit 1.4.1