pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc/ispell



Module Name:    pkgsrc
Committed By:   vins
Date:           Mon Nov  3 15:56:55 UTC 2025

Modified Files:
        pkgsrc/textproc/ispell: Makefile.common distinfo
        pkgsrc/textproc/ispell/patches: patch-correct.c patch-parse.y
Added Files:
        pkgsrc/textproc/ispell/patches: patch-munchlist.X

Log Message:
textproc/ispell: add a couple of fixes


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/textproc/ispell/Makefile.common
cvs rdiff -u -r1.13 -r1.14 pkgsrc/textproc/ispell/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/textproc/ispell/patches/patch-correct.c \
    pkgsrc/textproc/ispell/patches/patch-parse.y
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/ispell/patches/patch-munchlist.X

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

Modified files:

Index: pkgsrc/textproc/ispell/Makefile.common
diff -u pkgsrc/textproc/ispell/Makefile.common:1.4 pkgsrc/textproc/ispell/Makefile.common:1.5
--- pkgsrc/textproc/ispell/Makefile.common:1.4  Sun Oct 26 19:16:52 2025
+++ pkgsrc/textproc/ispell/Makefile.common      Mon Nov  3 15:56:55 2025
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile.common,v 1.4 2025/10/26 19:16:52 vins Exp $
+# $NetBSD: Makefile.common,v 1.5 2025/11/03 15:56:55 vins Exp $
 
 # used by textproc/ispell/Makefile
 # used by textproc/ispell-en_GB/Makefile
 
 DISTNAME=      ispell-3.4.06
-PKGREVISION=   1
+PKGREVISION=   2
 
 DISTINFO_FILE= ${.CURDIR}/../../textproc/ispell/distinfo

Index: pkgsrc/textproc/ispell/distinfo
diff -u pkgsrc/textproc/ispell/distinfo:1.13 pkgsrc/textproc/ispell/distinfo:1.14
--- pkgsrc/textproc/ispell/distinfo:1.13        Sun Oct 26 19:16:52 2025
+++ pkgsrc/textproc/ispell/distinfo     Mon Nov  3 15:56:55 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2025/10/26 19:16:52 vins Exp $
+$NetBSD: distinfo,v 1.14 2025/11/03 15:56:55 vins Exp $
 
 BLAKE2s (ispell-3.4.06.tar.gz) = b494c7efa96d9c936af79d47f80dae930376025ddd9906b291a65a68cb4b7ecf
 SHA512 (ispell-3.4.06.tar.gz) = 276447f12ea87c5c75909b974ae2225ff6abd330a04b2e1c493161a807792cd0cf1143cb9b991b986d92a88ae831edb016650ba885c918055b94aa7de2b81384
@@ -10,7 +10,8 @@ SHA1 (patch-ae) = cb32a4c2a38dfbaa62d610
 SHA1 (patch-ai) = 1fbf9385818e0a0fcd4049d0407212b1456d2744
 SHA1 (patch-al) = ea63fc7dbc2200794157d9be781210cd8a4e671f
 SHA1 (patch-ar) = c5082129f55fb232db34e0796423e60fcd4ed5c2
-SHA1 (patch-correct.c) = 16f62f40c9ae2370f3fab90a5ff5e8ebbdebd834
+SHA1 (patch-correct.c) = 2cd156e09d525cb3a56f718dbeda71989480e0b7
 SHA1 (patch-deformatters_Makefile) = a66a43f679491df718149c0b6db36ed0f9962535
 SHA1 (patch-languages_english_english.2) = ae4d249890746a979787282c2e48aad3921ac77c
-SHA1 (patch-parse.y) = 71a64178bf336b5cec39184be2f0aeffb08c9dd3
+SHA1 (patch-munchlist.X) = 2ee26ba9100f3a2f327e2f82e333a9742e77f76a
+SHA1 (patch-parse.y) = 7334323dcb090ebafab4b31b57301cbdd1fa88bc

Index: pkgsrc/textproc/ispell/patches/patch-correct.c
diff -u pkgsrc/textproc/ispell/patches/patch-correct.c:1.1 pkgsrc/textproc/ispell/patches/patch-correct.c:1.2
--- pkgsrc/textproc/ispell/patches/patch-correct.c:1.1  Sun Oct 26 19:16:53 2025
+++ pkgsrc/textproc/ispell/patches/patch-correct.c      Mon Nov  3 15:56:55 2025
@@ -1,10 +1,32 @@
-$NetBSD: patch-correct.c,v 1.1 2025/10/26 19:16:53 vins Exp $
+$NetBSD: patch-correct.c,v 1.2 2025/11/03 15:56:55 vins Exp $
 
-Fix NULL pointer dereference in lookup() function.
+* Display all bytes from multibyte characters instead of converting them
+  into `cat -v' format. This fixes an ugly screen content shown while
+  checking UTF-8 files.
+* Fix NULL pointer dereference in lookup() function.
 
 --- correct.c.orig     2022-02-06 07:21:53.852873905 +0000
 +++ correct.c
-@@ -1536,7 +1536,7 @@ static void save_root_cap (word, pattern
+@@ -769,11 +769,14 @@ static int show_char (cp, linew, output,
+       ichar = SET_SIZE + laststringch;
+     else
+       ichar = chartoichar (ch);
+-    if (!vflag  &&  iswordch (ichar)  &&  len == 1)
++    if (!vflag  &&  iswordch (ichar)  &&  len >= 1)
+       {
+-      if (output)
+-          (void) putchar (ch);
+-      (*cp)++;
++      for (i = 0; i < len; ++i)
++          {
++              if (output)
++                      (void) putchar (**cp);
++              (*cp)++;
++          }
+       return 1;
+       }
+     if (ch == '\t')
+@@ -1536,7 +1539,7 @@ static void save_root_cap (word, pattern
                return;
                }
            }
@@ -13,7 +35,7 @@ Fix NULL pointer dereference in lookup()
            {
            dent = dent->next;
            if (captype (dent->flagfield) == FOLLOWCASE
-@@ -1577,7 +1577,7 @@ static void save_root_cap (word, pattern
+@@ -1577,7 +1580,7 @@ static void save_root_cap (word, pattern
      len = icharlen (p);
      if (dent->flagfield & MOREVARIANTS)
        dent = dent->next;      /* Skip place-holder entry */
Index: pkgsrc/textproc/ispell/patches/patch-parse.y
diff -u pkgsrc/textproc/ispell/patches/patch-parse.y:1.1 pkgsrc/textproc/ispell/patches/patch-parse.y:1.2
--- pkgsrc/textproc/ispell/patches/patch-parse.y:1.1    Sun Oct 26 19:16:53 2025
+++ pkgsrc/textproc/ispell/patches/patch-parse.y        Mon Nov  3 15:56:55 2025
@@ -1,8 +1,10 @@
-$NetBSD: patch-parse.y,v 1.1 2025/10/26 19:16:53 vins Exp $
+$NetBSD: patch-parse.y,v 1.2 2025/11/03 15:56:55 vins Exp $
 
-Prevent implicit declaration of bcopy.
+* Prevent implicit declaration of bcopy.
+* Initialize table with zero to prevent uninitialized memory
+  from being written. See https://bugs.debian.org/778862
 
---- parse.y.orig       2025-10-26 19:10:34.789087124 +0000
+--- parse.y.orig       2021-01-09 21:12:35.277053695 +0000
 +++ parse.y
 @@ -133,6 +133,7 @@ static char Rcs_Id[] =
   */
@@ -12,3 +14,49 @@ Prevent implicit declaration of bcopy.
  #include "config.h"
  #include "ispell.h"
  #include "proto.h"
+@@ -957,16 +958,16 @@ table            :       flagdef
+                               tblsize = centnum + TBLINC;
+                               tblnum = 0;
+                               table = (struct flagent *)
+-                                malloc (tblsize * (sizeof (struct flagent)));
++                                calloc (tblsize, (sizeof (struct flagent)));
+                               if (table == NULL)
+                                   {
+                                   yyerror (PARSE_Y_NO_SPACE);
+                                   exit (1);
+                                   }
+                               }
+-                          else if (tblnum + centnum >= tblsize)
++                          else if (centnum >= tblsize)
+                               {
+-                              tblsize = tblnum + centnum + TBLINC;
++                              tblsize = centnum + TBLINC;
+                               table = (struct flagent *)
+                                 realloc ((char *) table,
+                                   tblsize * (sizeof (struct flagent)));
+@@ -975,6 +976,7 @@ table              :       flagdef
+                                   yyerror (PARSE_Y_NO_SPACE);
+                                   exit (1);
+                                   }
++                              memset((char*)table, 0, tblsize * sizeof(struct flagent));
+                               }
+                           for (tblnum = 0;  tblnum < centnum;  tblnum++)
+                               table[tblnum] = curents[tblnum];
+@@ -995,6 +997,8 @@ table              :       flagdef
+                                   yyerror (PARSE_Y_NO_SPACE);
+                                   exit (1);
+                                   }
++                              memset((char*)table + tblnum * sizeof(struct flagent), 0,
++                                      (tblsize - tblnum) * sizeof(struct flagent));
+                               }
+                           for (i = 0;  i < centnum;  i++)
+                               table[tblnum + i] = curents[i];
+@@ -1260,7 +1264,7 @@ conditions       :       char_set
+                           int                 i;
+ 
+                           ent = (struct flagent *)
+-                            malloc (sizeof (struct flagent));
++                            calloc (1, sizeof (struct flagent));
+                           if (ent == NULL)
+                               {
+                               yyerror (PARSE_Y_NO_SPACE);

Added files:

Index: pkgsrc/textproc/ispell/patches/patch-munchlist.X
diff -u /dev/null pkgsrc/textproc/ispell/patches/patch-munchlist.X:1.1
--- /dev/null   Mon Nov  3 15:56:55 2025
+++ pkgsrc/textproc/ispell/patches/patch-munchlist.X    Mon Nov  3 15:56:55 2025
@@ -0,0 +1,45 @@
+$NetBSD: patch-munchlist.X,v 1.1 2025/11/03 15:56:55 vins Exp $
+
+Replace deprecated `egrep' with either equivalent `grep -E'
+or `grep -F' if called with a non-regexp. 
+
+--- munchlist.X.orig   2015-02-08 08:35:41.149510902 +0000
++++ munchlist.X
+@@ -549,7 +549,7 @@ case "$flagmarker" in
+ esac    
+ #
+ # Munch the input to generate roots and affixes ($ISPELL -c).  We are
+-# only interested in words that have at least one affix (egrep $flagmarker);
++# only interested in words that have at least one affix (grep -E $flagmarker);
+ # the next step will pick up the rest.  Some of the roots are illegal.  We
+ # use join to restrict the output to those root words that are found
+ # in the original dictionary.
+@@ -564,7 +564,7 @@ fi
+ $ISPELL "$wchars" -c -W0 -d $FAKEHASH -p /dev/null < $STRIPPEDINPUT \
+   | tr " " '
+ ' \
+-  | egrep "$flagmarker" | sort $SORTTMP -u "-t$flagmarker" $sortopts \
++  | grep -E "$flagmarker" | sort $SORTTMP -u "-t$flagmarker" $sortopts \
+   | $JOIN $SIGNED "-t$flagmarker" - $EXPANDEDINPUT > $CRUNCHEDINPUT
+ #
+ # We now have a list of legal roots, and of affixes that apply to the
+@@ -668,8 +668,8 @@ $ISPELL -D -d $FAKEHASH \
+   | tr '      ' ' ' \
+   | sort $SORTTMP $sortopts > $PRODUCTLIST
+ 
+-if [ `egrep ' p ' $PRODUCTLIST | wc -l` -gt 0 \
+-  -a `egrep ' s ' $PRODUCTLIST | wc -l` -gt 0 ]
++if [ `grep -F ' p ' $PRODUCTLIST | wc -l` -gt 0 \
++  -a `grep -F ' s ' $PRODUCTLIST | wc -l` -gt 0 ]
+ then
+     #
+     # The language tables allow cross products.  See if LEGALFLAGLIST has
+@@ -680,7 +680,7 @@ then
+ '`
+     sufflags=`sed -n -e 's/^[ 0-9]*s //p' $PRODUCTLIST | tr -d '
+ '`
+-    egrep "$flagmarker.*[$preflags].*[$sufflags]|$flagmarker.*[$sufflags].*[$preflags]" \
++    grep -E "$flagmarker.*[$preflags].*[$sufflags]|$flagmarker.*[$sufflags].*[$preflags]" \
+       $LEGALFLAGLIST \
+       > $CROSSROOTS
+ 



Home | Main Index | Thread Index | Old Index