pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/misc/fzy



Module Name:    pkgsrc
Committed By:   leot
Date:           Sun Aug 31 10:19:45 UTC 2025

Modified Files:
        pkgsrc/misc/fzy: Makefile distinfo
Added Files:
        pkgsrc/misc/fzy/patches: patch-src_match.c patch-src_tty__interface.c

Log Message:
fzy: Fix ctype(3) abuse

PKGREVISION++


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/misc/fzy/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/misc/fzy/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/misc/fzy/patches/patch-src_match.c \
    pkgsrc/misc/fzy/patches/patch-src_tty__interface.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/misc/fzy/Makefile
diff -u pkgsrc/misc/fzy/Makefile:1.5 pkgsrc/misc/fzy/Makefile:1.6
--- pkgsrc/misc/fzy/Makefile:1.5        Sat Aug  9 19:23:52 2025
+++ pkgsrc/misc/fzy/Makefile    Sun Aug 31 10:19:45 2025
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2025/08/09 19:23:52 leot Exp $
+# $NetBSD: Makefile,v 1.6 2025/08/31 10:19:45 leot Exp $
 
 DISTNAME=      fzy-1.1
+PKGREVISION=   1
 CATEGORIES=    misc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=jhawthorn/}
 

Index: pkgsrc/misc/fzy/distinfo
diff -u pkgsrc/misc/fzy/distinfo:1.7 pkgsrc/misc/fzy/distinfo:1.8
--- pkgsrc/misc/fzy/distinfo:1.7        Sat Aug  9 19:23:52 2025
+++ pkgsrc/misc/fzy/distinfo    Sun Aug 31 10:19:45 2025
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.7 2025/08/09 19:23:52 leot Exp $
+$NetBSD: distinfo,v 1.8 2025/08/31 10:19:45 leot Exp $
 
 BLAKE2s (fzy-1.1.tar.gz) = 1db13373db47c4b120bd0b4cde0d8c1bdbae3dea0b55b7f687356b2185c2b529
 SHA512 (fzy-1.1.tar.gz) = 09a14c409f9c0000a0827c14007eeb919404e6b29b11b8d05c415575e678238a669c9fff7c8cd23ab330c9dc0341186c6c52347745813570cc4e0987e26d3781
 Size (fzy-1.1.tar.gz) = 49070 bytes
 SHA1 (patch-Makefile) = 9b3ec29304d110b4a33a550af7b17cf16f92d634
+SHA1 (patch-src_match.c) = c78567d02e1479ae09a50b58b7e366a5ecf77786
+SHA1 (patch-src_tty__interface.c) = 485286ddaa67174fbe66e031d1af2d6f99615ae2

Added files:

Index: pkgsrc/misc/fzy/patches/patch-src_match.c
diff -u /dev/null pkgsrc/misc/fzy/patches/patch-src_match.c:1.1
--- /dev/null   Sun Aug 31 10:19:46 2025
+++ pkgsrc/misc/fzy/patches/patch-src_match.c   Sun Aug 31 10:19:45 2025
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_match.c,v 1.1 2025/08/31 10:19:45 leot Exp $
+
+Fix ctype(3) abuse
+
+--- src/match.c.orig   2025-08-31 10:15:49.302462188 +0000
++++ src/match.c
+@@ -59,10 +59,10 @@ static void setup_match_struct(struct ma
+       }
+ 
+       for (int i = 0; i < match->needle_len; i++)
+-              match->lower_needle[i] = tolower(needle[i]);
++              match->lower_needle[i] = tolower((unsigned char)needle[i]);
+ 
+       for (int i = 0; i < match->haystack_len; i++)
+-              match->lower_haystack[i] = tolower(haystack[i]);
++              match->lower_haystack[i] = tolower((unsigned char)haystack[i]);
+ 
+       precompute_bonus(haystack, match->match_bonus);
+ }
Index: pkgsrc/misc/fzy/patches/patch-src_tty__interface.c
diff -u /dev/null pkgsrc/misc/fzy/patches/patch-src_tty__interface.c:1.1
--- /dev/null   Sun Aug 31 10:19:46 2025
+++ pkgsrc/misc/fzy/patches/patch-src_tty__interface.c  Sun Aug 31 10:19:45 2025
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_tty__interface.c,v 1.1 2025/08/31 10:19:45 leot Exp $
+
+Fix ctype(3) abuse
+
+--- src/tty_interface.c.orig   2025-08-31 10:16:28.393716776 +0000
++++ src/tty_interface.c
+@@ -170,10 +170,10 @@ static void action_del_word(tty_interfac
+       size_t original_cursor = state->cursor;
+       size_t cursor = state->cursor;
+ 
+-      while (cursor && isspace(state->search[cursor - 1]))
++      while (cursor && isspace((unsigned char)state->search[cursor - 1]))
+               cursor--;
+ 
+-      while (cursor && !isspace(state->search[cursor - 1]))
++      while (cursor && !isspace((unsigned char)state->search[cursor - 1]))
+               cursor--;
+ 
+       memmove(&state->search[cursor], &state->search[original_cursor], strlen(state->search) - original_cursor + 1);



Home | Main Index | Thread Index | Old Index