[前][次][番号順一覧][スレッド一覧]

ruby-changes:71609

From: Nobuyoshi <ko1@a...>
Date: Sat, 2 Apr 2022 19:24:16 +0900 (JST)
Subject: [ruby-changes:71609] 4ee71097a0 (master): [ruby/zlib] Mask checksums to lower 32bits on also IL32 platforms

https://git.ruby-lang.org/ruby.git/commit/?id=4ee71097a0

From 4ee71097a0557d01e5689c5edf52e508c6978571 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 2 Apr 2022 19:07:45 +0900
Subject: [ruby/zlib] Mask checksums to lower 32bits on also IL32 platforms

https://github.com/ruby/zlib/commit/e1ead85113
---
 ext/zlib/zlib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 168b3d0a0a..70f422a124 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -395,7 +395,7 @@ checksum_long(uLong (*func)(uLong, const Bytef*, uInt), uLong sum, const Bytef * https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L395
     return sum;
 }
 #else
-#define checksum_long(func, sum, ptr, len) (func)((sum), (ptr), (len))
+#define checksum_long(func, sum, ptr, len) (func)(mask32(sum), (ptr), (len))
 #endif
 
 static VALUE
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]