Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package moc for openSUSE:Factory checked in 
at 2022-04-02 18:20:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/moc (Old)
 and      /work/SRC/openSUSE:Factory/.moc.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "moc"

Sat Apr  2 18:20:49 2022 rev:15 rq:966511 version:2.6.0~svn2994

Changes:
--------
--- /work/SRC/openSUSE:Factory/moc/moc.changes  2020-03-29 14:28:41.554189452 
+0200
+++ /work/SRC/openSUSE:Factory/.moc.new.1900/moc.changes        2022-04-02 
18:21:03.585925412 +0200
@@ -1,0 +2,6 @@
+Tue Mar 29 20:42:31 UTC 2022 - Victorhck <victor...@opensuse.org>
+
+- Added patch moc.crash.GLIB-2.35-1.patch to fix bug with 
+  GLIBC 2.35 causes it to crash.
+
+-------------------------------------------------------------------

New:
----
  moc.crash.GLIB-2.35-1.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ moc.spec ++++++
--- /var/tmp/diff_new_pack.SgywWd/_old  2022-04-02 18:21:04.081919845 +0200
+++ /var/tmp/diff_new_pack.SgywWd/_new  2022-04-02 18:21:04.089919754 +0200
@@ -27,6 +27,7 @@
 
 Patch1:         moc.timestamp.patch
 Patch2:         moc.TiMidity_Config.patch
+Patch3:         moc.crash.GLIB-2.35-1.patch
 
 BuildRequires:  autoconf
 BuildRequires:  automake

++++++ moc.crash.GLIB-2.35-1.patch ++++++
>From 78556fc13026220f800384accf04e139f11e099a Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugue...@gmail.com>
Date: Thu, 17 Feb 2022 22:27:34 +0100
Subject: [PATCH] Workaround mbsrtowcs fortify crash in GLIBC 2.35

Reproduces with:
    gcc -O2 -Wp,-D_FORTIFY_SOURCE=2 -c test.c test && ./test

And test.c:
    #include <stdio.h>
    #include <stdlib.h>
    #include <wchar.h>

    int main (void)
    {
        mbstate_t ps = {0};
        mbsrtowcs (NULL, &hw, (size_t)-1, &ps);
        return 0;
    }

Output:
    *** buffer overflow detected ***: terminated
---
 utf8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utf8.c b/utf8.c
index 2db18f2..806d528 100644
--- a/utf8.c
+++ b/utf8.c
@@ -167,7 +167,7 @@ static size_t xmbstowcs (wchar_t *dest, const char *src, 
size_t len,
        while (src && (len || !dest)) {
                size_t res;
 
-               res = mbsrtowcs (dest, &src, len, &ps);
+               res = mbsrtowcs (dest, &src, dest ? len : 0, &ps);
                if (res != (size_t)-1) {
                        count += res;
                        src = NULL;
-- 
2.35.1

Reply via email to