pkgsrc-Bugs archive

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

Re: pkg/60802: x11/xscreensaver 2026Q3 cannot unlock screen



The following reply was made to PR pkg/60802; it has been noted by GNATS.

From: Ramiro Aceves <ea1abz%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/60802: x11/xscreensaver 2026Q3 cannot unlock screen
Date: Mon, 12 Oct 2026 18:33:31 +0200

 Hello!.
 
 Past Saturday (Sábado)  xscreensaver-auth crashed as expected, saving core to /tmp worked fine
 
 thanks to the tips of martin%duskware.de@localhost
 
 kern.coredump.setid.dump=1
 
 And <snow%flurry.sh@localhost>
 
 kern.coredump.setid.path=/tmp/%n.core
 
 GDB pointed to:
 
 work/xscreensaver-6.15/utils/utf8wc.c, line 378
 
 
          uc == 0xFF0D ||       /* FULLWIDTH HYPHEN-MINUS */
 
 I changed char to unsigned char, recompiled, replaced package and it works fine showing "Sáb" in date.
 
 old:
 return (ispunct((char) uc) ||        /* Posix: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ */
 
 new:
 return (ispunct((unsigned char) uc) ||        /* Posix: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ */
 
 
 full function after correction:
 
 
 uc_ispunct (unsigned long uc)
 {
    /* "Unicode Standard Annex #14, Line Breaking Algorithm"
       https://www.unicode.org/reports/tr14/
       ...is a lot.  But this is probably good enough?
     */
    return (ispunct((unsigned char) uc) ||        /* Posix: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ */
            uc == 0x002D ||       /* HYPHEN-MINUS */
            uc == 0x058A ||       /* ARMENIAN HYPHEN */
            uc == 0x05BE ||       /* HEBREW PUNCTUATION MAQAF */
            uc == 0x1400 ||       /* CANADIAN SYLLABICS HYPHEN */
            uc == 0x1806 ||       /* MONGOLIAN TODO SOFT HYPHEN */
            uc == 0x2010 ||       /* HYPHEN */
            uc == 0x2011 ||       /* NON-BREAKING HYPHEN */
            uc == 0x2012 ||       /* FIGURE DASH */
            uc == 0x2013 ||       /* EN DASH */
            uc == 0x2014 ||       /* EM DASH */
            uc == 0x2015 ||       /* HORIZONTAL BAR */
            uc == 0x2053 ||       /* SWUNG DASH */
            uc == 0x207B ||       /* SUPERSCRIPT MINUS */
            uc == 0x208B ||       /* SUBSCRIPT MINUS */
            uc == 0x2212 ||       /* MINUS SIGN */
            uc == 0x2E17 ||       /* DOUBLE OBLIQUE HYPHEN */
            uc == 0x2E1A ||       /* HYPHEN WITH DIAERESIS */
            uc == 0x2E3A ||       /* TWO-EM DASH */
            uc == 0x2E3B ||       /* THREE-EM DASH */
            uc == 0x2E40 ||       /* DOUBLE HYPHEN */
            uc == 0x2E5D ||       /* OBLIQUE HYPHEN */
            uc == 0x301C ||       /* WAVE DASH */
            uc == 0x3030 ||       /* WAVY DASH */
            uc == 0x30A0 ||       /* KATAKANA-HIRAGANA DOUBLE HYPHEN */
            uc == 0xFE31 ||       /* PRESENTATION FORM FOR VERTICAL EM DASH */
            uc == 0xFE32 ||       /* PRESENTATION FORM FOR VERTICAL EN DASH */
            uc == 0xFE58 ||       /* SMALL EM DASH */
            uc == 0xFE63 ||       /* SMALL HYPHEN-MINUS */
            uc == 0xFF0D ||       /* FULLWIDTH HYPHEN-MINUS */
            uc == 0x10EAD);       /* YEZIDI HYPHENATION MARK */
 }
 
 
 
 
 ***Roland roland.illig%gmx.de@localhost pointed that:***************************
 
  >    return (ispunct((unsigned char) uc) ||        /* Posix: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ */
  >            uc == 0x002D ||       /* HYPHEN-MINUS */
  >            uc == 0x058A ||       /* ARMENIAN HYPHEN */
 
 That fixes the undefined behavior but is still wrong. The letter U+0121
 "Ä¡" is classified as a punctuation sign because its lower 8 bits are a
 punctuation sign. That's a wrong conclusion. Instead, the condition
 should be:
 
 (uc < 0x0080 && ispunct((unsigned char)uc)) || â?¦
 
 In that code, the cast to unsigned char is not strictly necessary
 anymore, but I'd leave it there for static analyzers like lint(1).
 ********************************************************************
 
 
 I have applied this patch as he suggested and compiled again. Will test on next saturday.
 
 
 netbsd-nuc# cat /usr/pkgsrc/x11/xscreensaver/patches/patch-utils_utf8wc.c
 $NetBSD$
 
 --- utils/utf8wc.c.orig    2026-10-11 18:25:46.260960200 +0000
 +++ utils/utf8wc.c
 @@ -346,7 +346,7 @@ uc_ispunct (unsigned long uc)
        https://www.unicode.org/reports/tr14/
        ...is a lot.  But this is probably good enough?
      */
 -  return (ispunct((char) uc) ||    /* Posix: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ */
 +  return ((uc < 0x0080 && ispunct((unsigned char) uc)) ||    /* Posix: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ */
             uc == 0x002D ||    /* HYPHEN-MINUS */
             uc == 0x058A ||    /* ARMENIAN HYPHEN */
             uc == 0x05BE ||    /* HEBREW PUNCTUATION MAQAF */
 netbsd-nuc#
 



Home | Main Index | Thread Index | Old Index