Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libnbcompat for openSUSE:Factory 
checked in at 2023-06-11 19:54:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libnbcompat (Old)
 and      /work/SRC/openSUSE:Factory/.libnbcompat.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libnbcompat"

Sun Jun 11 19:54:21 2023 rev:3 rq:1091706 version:1.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/libnbcompat/libnbcompat.changes  2021-11-04 
16:10:34.225081905 +0100
+++ /work/SRC/openSUSE:Factory/.libnbcompat.new.15902/libnbcompat.changes       
2023-06-11 19:57:14.155867316 +0200
@@ -1,0 +2,9 @@
+Thu Jun  8 01:44:40 UTC 2023 - Aleksa Sarai <asa...@suse.com>
+
+- Fix broken sha256 hashes on Tumbleweed (gcc>=11) issue and add check section
+  running new "make check" script to verify hash output during builds.
+  boo#1212120
+  + 0001-hash-functions-add-tests-to-verify-output-against-te.patch
+  + 0002-Fix-SHA256-bug-due-to-strict-aliasing-violations-wit.patch
+
+-------------------------------------------------------------------

New:
----
  0001-hash-functions-add-tests-to-verify-output-against-te.patch
  0002-Fix-SHA256-bug-due-to-strict-aliasing-violations-wit.patch

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

Other differences:
------------------
++++++ libnbcompat.spec ++++++
--- /var/tmp/diff_new_pack.uWCfQp/_old  2023-06-11 19:57:14.707870645 +0200
+++ /var/tmp/diff_new_pack.uWCfQp/_new  2023-06-11 19:57:14.711870668 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libnbcompat
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,9 @@
 Group:          Development/Libraries/C and C++
 URL:            https://github.com/archiecobbs/%{name}
 Source:         
https://github.com/archiecobbs/%{name}/archive/%{version}.tar.gz
+# UPSTREAM-FIX: Fixes for sha256 hashing bug. boo#1212120
+Patch1:         0001-hash-functions-add-tests-to-verify-output-against-te.patch
+Patch2:         0002-Fix-SHA256-bug-due-to-strict-aliasing-violations-wit.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  gcc
@@ -55,7 +58,7 @@
 bootstrap tools that are missing on other operating systems.
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
 autoreconf -vfi -I .
@@ -66,6 +69,9 @@
 %make_install
 find %{buildroot} -type f -name "*.la" -delete -print
 
+%check
+%make_build check
+
 %post   -n %{libname} -p /sbin/ldconfig
 %postun -n %{libname} -p /sbin/ldconfig
 

++++++ 0001-hash-functions-add-tests-to-verify-output-against-te.patch ++++++
++++ 2376 lines (skipped)

++++++ 0002-Fix-SHA256-bug-due-to-strict-aliasing-violations-wit.patch ++++++
>From b6509283cbf8043990ea9e31ca22fc7495a1ca99 Mon Sep 17 00:00:00 2001
From: "Archie L. Cobbs" <archie.co...@gmail.com>
Date: Wed, 7 Jun 2023 10:20:20 -0500
Subject: [PATCH 2/2] Fix SHA256 bug due to strict aliasing violations with
 newer GCC optimizations (#4).

SUSE-Backport: commit 864c1cf42c2c ("Fix SHA256 bug due to strict aliasing 
violations with newer GCC optimizations (#4).")

---
 CHANGES | 5 +++++
 sha2.c  | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/CHANGES b/CHANGES
index e30ebc71d718..0e8c1a905714 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Version Next
+
+    - Fixed SHA256 bug due to strict aliasing violations with newer GCC 
optimizations (#4).
+    - Add hash test vectors (contributed by Aleksa Sarai)
+
 Version 1.0.1 released August 29, 2020
 
     - Avoid defining PACKAGE, etc. in installed header files
diff --git a/sha2.c b/sha2.c
index 62ad72f5e3e9..2a7ed2ba5d21 100644
--- a/sha2.c
+++ b/sha2.c
@@ -567,7 +567,7 @@ void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
                        *context->buffer = 0x80;
                }
                /* Set the bit count: */
-               *(sha2_word64*)(void 
*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
+               memcpy(&context->buffer[SHA256_SHORT_BLOCK_LENGTH], 
&context->bitcount, sizeof(context->bitcount));
 
                /* Final transform: */
                SHA256_Transform(context, (sha2_word32*)(void 
*)context->buffer);
@@ -870,8 +870,8 @@ static void SHA512_Last(SHA512_CTX* context) {
                *context->buffer = 0x80;
        }
        /* Store the length of input data (in bits): */
-       *(sha2_word64*)(void *)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = 
context->bitcount[1];
-       *(sha2_word64*)(void *)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = 
context->bitcount[0];
+       memcpy(&context->buffer[SHA512_SHORT_BLOCK_LENGTH], 
&context->bitcount[1], sizeof(context->bitcount[1]));
+       memcpy(&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8], 
&context->bitcount[0], sizeof(context->bitcount[0]));
 
        /* Final transform: */
        SHA512_Transform(context, (sha2_word64*)(void *)context->buffer);
-- 
2.40.1

Reply via email to