public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/webalizer] epel10: Add patch to fix some undefined behaviour by switching to memmove() (#1409349)
Date: Sun, 08 Nov 2026 08:16:32 GMT	[thread overview]
Message-ID: <179412579208.1.6952057753836873668.rpms-webalizer-21242682215b@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/webalizer
Branch : epel10
Commit : 21242682215bf19ea54201571c51374da7159bed
Author : Sérgio M. Basto <sergio@serjux.com>
Date   : 2017-01-11T03:08:49+00:00
Stats  : +39/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/webalizer/c/21242682215bf19ea54201571c51374da7159bed?branch=epel10

Log:
Add patch to fix some undefined behaviour by switching to memmove() (#1409349)

---
diff --git a/webalizer-2.23-08-memmove.patch b/webalizer-2.23-08-memmove.patch
new file mode 100644
index 0000000..44769da
--- /dev/null
+++ b/webalizer-2.23-08-memmove.patch
@@ -0,0 +1,33 @@
+diff -u new/dns_resolv.c new.1/dns_resolv.c
+--- new/dns_resolv.c	2013-02-26 05:37:27.000000000 +0000
++++ new.1/dns_resolv.c	2016-04-05 06:57:30.827715718 +0000
+@@ -886,7 +886,7 @@
+    /* kludge for IPv6 6to4 (RFC3056) */
+    if (addr[0]==0x20 && addr[1]==0x02)
+    {
+-      memcpy(&addr[12],&addr[2],4);
++      memmove(&addr[12],&addr[2],4);
+       memset(&addr,0,12);
+    }
+ 
+diff -u new/preserve.c new.1/preserve.c
+--- new/preserve.c	2013-02-26 05:37:27.000000000 +0000
++++ new.1/preserve.c	2016-04-05 06:56:39.023080706 +0000
+@@ -109,7 +109,7 @@
+                         yr = hist[i].year;
+                         mth= hist[i].month+1;
+                         if (mth>12) { mth=1; yr++; }
+-                        memcpy(&hist[0], &hist[1], sizeof(hist[0])*i);
++                        memmove(&hist[0], &hist[1], sizeof(hist[0])*i);
+                         memset(&hist[i], 0, sizeof(struct hist_rec));
+                         hist[i].year=yr; hist[i].month=mth; n--;
+                     }
+@@ -277,7 +277,7 @@
+                   yr = hist[i].year;
+                   mth= hist[i].month+1;
+                   if (mth>12) { mth=1; yr++; }
+-                  memcpy(&hist[0],&hist[1],sizeof(hist[0])*i);
++                  memmove(&hist[0],&hist[1],sizeof(hist[0])*i);
+                   memset(&hist[i], 0, sizeof(struct hist_rec));
+                   hist[i].year=yr; hist[i].month=mth; n--;
+                }

diff --git a/webalizer.spec b/webalizer.spec
index 1fa4c2b..a0a12e3 100644
--- a/webalizer.spec
+++ b/webalizer.spec
@@ -11,7 +11,7 @@ Name: webalizer
 Summary: A flexible Web server log file analysis program
 Group: Applications/Internet
 Version: 2.23_08
-Release: 5%{?dist}
+Release: 6%{?dist}
 URL: http://www.mrunix.net/webalizer/
 License: GPLv2+
 Source0: ftp://ftp.mrunix.net/pub/webalizer/%{name}-%{ver}-%{patchlevel}-src.tgz
@@ -22,6 +22,7 @@ Source4: webalizer.sysconfig
 Patch4: webalizer-2.21-02-underrun.patch
 Patch6: webalizer-2.23-05-confuser.patch
 Patch9: webalizer-2.23-05-groupvisit.patch
+Patch10: webalizer-2.23-08-memmove.patch
 BuildRequires: gd-devel, %{db_devel}, bzip2-devel
 BuildRequires: GeoIP-devel
 Requires(pre): shadow-utils
@@ -39,6 +40,7 @@ Web traffic is coming from easy.
 %patch4 -p1 -b .underrun
 %patch6 -p1 -b .confuser
 %patch9 -p1 -b .groupvisit
+%patch10 -p1 -b .memmove
 
 %build
 #CPPFLAGS="-I%{_includedir}/db4" ; export CPPFLAGS
@@ -88,6 +90,9 @@ exit 0
 %attr(-, webalizer, root) %{_localstatedir}/www/usage/*.png
 
 %changelog
+* Wed Jan 11 2017 Sérgio Basto <sergio@serjux.com> - 2.23_08-6
+- Add patch to fix some undefined behaviour by switching to memmove() (#1409349)
+
 * Tue Dec 20 2016 Robert Scheck <robert@fedoraproject.org> - 2.23_08-5
 - Build on EPEL >= 7 against libdb-devel to enable DNS/GeoDB code
 

                 reply	other threads:[~2026-11-08  8:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179412579208.1.6952057753836873668.rpms-webalizer-21242682215b@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox