svn commit: r542134 - in head/net/syncthing: . files
Steve Wills
swills at FreeBSD.org
Mon Jul 13 14:06:29 UTC 2020
Author: swills
Date: Mon Jul 13 14:06:28 2020
New Revision: 542134
URL: https://svnweb.freebsd.org/changeset/ports/542134
Log:
net/syncthing: add patch to fix issue 6827
https://github.com/syncthing/syncthing/issues/6827
Added:
head/net/syncthing/files/patch-171.diff (contents, props changed)
Modified:
head/net/syncthing/Makefile (contents, props changed)
Modified: head/net/syncthing/Makefile
==============================================================================
--- head/net/syncthing/Makefile Mon Jul 13 14:05:03 2020 (r542133)
+++ head/net/syncthing/Makefile Mon Jul 13 14:06:28 2020 (r542134)
@@ -2,6 +2,7 @@
PORTNAME= syncthing
PORTVERSION= 1.7.0
+PORTREVISION= 1
DISTVERSIONPREFIX= v
CATEGORIES= net
MASTER_SITES= https://github.com/syncthing/syncthing/releases/download/v${PORTVERSION}/
Added: head/net/syncthing/files/patch-171.diff
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/syncthing/files/patch-171.diff Mon Jul 13 14:06:28 2020 (r542134)
@@ -0,0 +1,20 @@
+--- syncthing/lib/scanner/blocks.go.orig
++++ syncthing/lib/scanner/blocks.go
+@@ -108,12 +108,12 @@ func Blocks(ctx context.Context, r io.Reader, blocksize int, sizehint int64, cou
+ return blocks, nil
+ }
+
+-// Validate quickly validates buf against the cryptohash hash (if len(hash)>0)
+-// and the 32-bit hash weakHash (if not zero). It is satisfied if either hash
+-// matches, or neither is given.
++// Validate quickly validates buf against the 32-bit weakHash, if not zero,
++// else against the cryptohash hash, if len(hash)>0. It is satisfied if
++// either hash matches or neither hash is given.
+ func Validate(buf, hash []byte, weakHash uint32) bool {
+- if weakHash != 0 {
+- return adler32.Checksum(buf) == weakHash
++ if weakHash != 0 && adler32.Checksum(buf) == weakHash {
++ return true
+ }
+
+ if len(hash) > 0 {
More information about the svn-ports-all
mailing list