[packages/ssdeep] Rel 2; upstream fixes

arekm arekm at pld-linux.org
Fri Aug 28 08:27:39 CEST 2026


commit 8ed2f5786f4d31dc81ac786143d0f6fff891aa4b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Aug 28 08:27:25 2026 +0200

    Rel 2; upstream fixes

 ssdeep-warnings-leaks.patch | 95 +++++++++++++++++++++++++++++++++++++++++++++
 ssdeep.spec                 |  7 +++-
 2 files changed, 101 insertions(+), 1 deletion(-)
---
diff --git a/ssdeep.spec b/ssdeep.spec
index 1704957..fb784e1 100644
--- a/ssdeep.spec
+++ b/ssdeep.spec
@@ -1,11 +1,13 @@
 Summary:	Compute context triggered piecewise hashes
 Name:		ssdeep
 Version:	2.14.1
-Release:	1
+Release:	2
 License:	GPL v2+
+Group:		Applications/File
 URL:		https://ssdeep-project.github.io/ssdeep/
 Source0:	https://github.com/ssdeep-project/ssdeep/releases/download/release-%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	ed4f374e20ffec72e679f56c32218581
+Patch0:		%{name}-warnings-leaks.patch
 BuildRequires:	libstdc++-devel
 Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
 
@@ -18,6 +20,7 @@ both content and length.
 
 %package devel
 Summary:	Development files for libfuzzy
+Group:		Development/Libraries
 Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
 
 %description devel
@@ -26,6 +29,7 @@ developing applications that use libfuzzy.
 
 %package libs
 Summary:	Runtime libfuzzy library
+Group:		Libraries
 
 %description libs
 The %{name}-libs package contains libraries needed by applications
@@ -34,6 +38,7 @@ that use libfuzzy.
 
 %prep
 %setup -q
+%patch -P0 -p1
 
 %build
 %configure \
diff --git a/ssdeep-warnings-leaks.patch b/ssdeep-warnings-leaks.patch
new file mode 100644
index 0000000..4e33536
--- /dev/null
+++ b/ssdeep-warnings-leaks.patch
@@ -0,0 +1,95 @@
+From 2f435da27d64cc904146d2b8f8620002b9312811 Mon Sep 17 00:00:00 2001
+From: Travis Finkenauer <tmfink at juniper.net>
+Date: Wed, 29 Nov 2017 14:06:10 -0800
+Subject: [PATCH] Fix some compiler warnings and resource leaks
+
+* edit_dist.c: Include edit_dist.h to pick up forward declaration of
+  edit_distn().
+* engine.cpp (display_result): Initialize before use in case of uncaught
+  exception.
+* filedata.h (class Filedata): Avoid unused variable warning.
+* find-file-size.c: Add function prototypes for find_dev_size() and
+  find_file_size() to keep compiler happy.
+* fuzzy.c (fuzzy_hash_file): Avoid a memory leak.
+* match.cpp (sig_file_close): Fix reversed logic to close handle.
+---
+diff --git a/edit_dist.c b/edit_dist.c
+index f46aebb..ac8ae4a 100644
+--- a/edit_dist.c
++++ b/edit_dist.c
+@@ -47,6 +47,7 @@ int edit_distn(const char *s1, size_t s1len, const char *s2, size_t s2len) {
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include "edit_dist.h"
+ 
+ #define HELLOWORLD "Hello World!"
+ 
+diff --git a/engine.cpp b/engine.cpp
+index 0df7c6e..5fa3ff3 100644
+--- a/engine.cpp
++++ b/engine.cpp
+@@ -9,7 +9,7 @@
+ bool display_result(state *s, const TCHAR * fn, const char * sum) {
+   // Only spend the extra time to make a Filedata object if we need to
+   if (MODE(mode_match_pretty) or MODE(mode_match) or MODE(mode_directory)) {
+-    Filedata * f;
++    Filedata * f = NULL;
+     
+     try {
+       f = new Filedata(fn, sum);
+diff --git a/filedata.h b/filedata.h
+index 5159288..99292c2 100644
+--- a/filedata.h
++++ b/filedata.h
+@@ -52,7 +52,7 @@ class Filedata
+   ~Filedata() { if (m_filename) { free(m_filename); } }
+ 
+  private:
+-  Filedata(const Filedata &other) { assert(false); /* never copy */ }
++  Filedata(const Filedata &other) { (void) other; assert(false); /* never copy */ }
+ 
+   std::set<Filedata *> * m_cluster;
+ 
+diff --git a/find-file-size.c b/find-file-size.c
+index bcc2ae8..08627ec 100644
+--- a/find-file-size.c
++++ b/find-file-size.c
+@@ -7,6 +7,11 @@
+ 
+ #include "main.h"
+ 
++// Prototypes
++off_t find_file_size(FILE *f);
++off_t find_dev_size(int fd, int blk_size);
++
++
+ #ifndef _WIN32
+ 
+ // Return the size, in bytes of an open file stream. On error, return 0 
+diff --git a/fuzzy.c b/fuzzy.c
+index 670b92b..0a7714e 100644
+--- a/fuzzy.c
++++ b/fuzzy.c
+@@ -583,7 +583,7 @@ int fuzzy_hash_file(FILE *handle, /*@out@*/ char *result)
+   if (status == 0)
+   {
+     if (fseeko(handle, fpos, SEEK_SET) < 0)
+-      return -1;
++      status = -1;
+   }
+   fuzzy_free(ctx);
+   return status;
+diff --git a/match.cpp b/match.cpp
+index 717aa2b..60ca7be 100644
+--- a/match.cpp
++++ b/match.cpp
+@@ -127,7 +127,7 @@ bool sig_file_close(state *s)
+ 
+   free(s->known_fn);
+ 
+-  if (s->known_handle != NULL) 
++  if (s->known_handle == NULL)
+     return true;
+ 
+   if (fclose(s->known_handle))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ssdeep.git/commitdiff/8ed2f5786f4d31dc81ac786143d0f6fff891aa4b



More information about the pld-cvs-commit mailing list