Merge ~bryce/ubuntu/+source/clamav:merge-v1.0.5adfsg-1.1-noble into ubuntu/+source/clamav:debian/sid

Proposed by Bryce Harrington
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merge reported by: git-ubuntu bot
Merged at revision: 2e8b31ce0954b960dd6b0ef1302b3c06f9ad3372
Proposed branch: ~bryce/ubuntu/+source/clamav:merge-v1.0.5adfsg-1.1-noble
Merge into: ubuntu/+source/clamav:debian/sid
Diff against target: 487 lines (+310/-54)
7 files modified
debian/changelog (+159/-0)
debian/clamav-base.postinst.in (+1/-1)
debian/clamav-freshclam-ifupdown (+104/-52)
debian/clamav-freshclam.links (+3/-0)
debian/control (+2/-1)
debian/patches/resolve-armhf-ftbfs.patch (+40/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Andreas Hasenack Approve
Canonical Server Reporter Pending
Canonical Server packageset reviewers Pending
Review via email: mp+461761@code.launchpad.net

Description of the change

Merge clamav 1.0.5+dfsg-1.1 to bring in the t64 changes.

For the security merge, it appears they also refreshed po files, which caused conflicts on rebase. The changes appear to be file formatting rather than changed translations, though, so I just dropped the po changes in the logical and things went fine thereafter.

PPA: https://launchpad.net/~bryce/+archive/ubuntu/clamav-merge-v1.0.5adfsg-1.1

PPA is still building, so no autopkgtests at this time.

To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

checking this out

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I think you should have kept the po changes in the logical tag, and dropped them later on when applying on top of debian/new.

Logical should show what the delta is at that version, and it does have the po changes (which I also think were added by mistake). But they should be dropped at rebase on top of new/debian time, not in logical.

I would add a "[previously undocumented]" line to the commit that you split out about the pos, and then drop it when rebasing on new/debian, possibly with a comment ("* Dropped: previously added PO update, apparently by mistake"). You could also ping Marc to see if he remember what that was about.

review: Needs Fixing
24136f1... by Bryce Harrington

merge-changelogs

bff6267... by Bryce Harrington

reconstruct-changelog

2e8b31c... by Bryce Harrington

update-maintainer

Revision history for this message
Bryce Harrington (bryce) wrote :

I redid the merge with keeping the po for logical tag and then dropping it before the rebase. I've also listed it explicitly as Dropped.

Since the PPA failed to build due to known issue of missing deps on armhf I didn't bother updating it.

I'll ping Marc about this MP in case he has an opinion on the po change inclusion.

Revision history for this message
Bryce Harrington (bryce) wrote :

Marc answered this po change gets automatically applied by the builders, and will come back. So seems fine to omit.

Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):

+1

range-diff ok
debian changes ok
build failing is unfortunately expected for now :)

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: bryce, ahasenack
Uploaders: bryce, ahasenack
MP auto-approved

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

I'll save it for next merge, but Marc suggests looking at this:

maybe this in rules:
    # Update .po files for debconf.
    debconf-updatepo

I don't know what side-effects that might have so am reluctant to introduce it past FF in an LTS but may give it a go next cycle.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for the review; uploaded:

Successfully signed dsc, buildinfo, changes files
Vcs-Git: https://git.launchpad.net/~bryce/ubuntu/+source/clamav
Vcs-Git-Commit: 2e8b31ce0954b960dd6b0ef1302b3c06f9ad3372
Vcs-Git-Ref: refs/heads/merge-v1.0.5adfsg-1.1-noble
$ dput ubuntu ../clamav_1.0.5+dfsg-1.1ubuntu1_source.changes
gpg: ../clamav_1.0.5+dfsg-1.1ubuntu1_source.changes: Valid signature from E603B2578FB8F0FB
gpg: ../clamav_1.0.5+dfsg-1.1ubuntu1.dsc: Valid signature from E603B2578FB8F0FB
D: Setting host argument.
Checking signature on .changes
Checking signature on .dsc
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading clamav_1.0.5+dfsg-1.1ubuntu1.dsc: done.
  Uploading clamav_1.0.5+dfsg.orig.tar.xz: done.
  Uploading clamav_1.0.5+dfsg-1.1ubuntu1.debian.tar.xz: done.
  Uploading clamav_1.0.5+dfsg-1.1ubuntu1_source.buildinfo: done.
  Uploading clamav_1.0.5+dfsg-1.1ubuntu1_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 6efb773..63722cc 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,24 @@
6+clamav (1.0.5+dfsg-1.1ubuntu1) noble; urgency=medium
7+
8+ * Merge with Debian unstable. Remaining changes:
9+ - d/p/resolve-armhf-ftbfs.patch: resolve armhf failure to build from
10+ source.
11+ - clamav-base.postinst.in: Quell warning from check for clamav user
12+ (LP 1920217).
13+ - Extend ifupdown script to support networkd-dispatcher.
14+ + d/clamav-freshclam-ifupdown: Modernize some parts of
15+ the script. Implement support for networkd-dispatcher.
16+ + d/clamav-freshclam.links: Install the
17+ clamav-freshclam-ifupdown script inside the proper
18+ /usr/lib/networkd-dispatcher/{off,routable}.d/
19+ directories. (LP 1718227)
20+ * Dropped:
21+ - po files update
22+ [previously undocumented]
23+ [causes merge conflict on rebase]
24+
25+ -- Bryce Harrington <bryce@canonical.com> Tue, 05 Mar 2024 11:00:58 -0800
26+
27 clamav (1.0.5+dfsg-1.1) unstable; urgency=medium
28
29 * Non-maintainer upload.
30@@ -5,6 +26,30 @@ clamav (1.0.5+dfsg-1.1) unstable; urgency=medium
31
32 -- Steve Langasek <vorlon@debian.org> Wed, 28 Feb 2024 15:44:10 +0000
33
34+clamav (1.0.5+dfsg-1ubuntu2) noble; urgency=medium
35+
36+ * No-change rebuild against libssl3t64
37+
38+ -- Steve Langasek <steve.langasek@ubuntu.com> Mon, 04 Mar 2024 17:34:24 +0000
39+
40+clamav (1.0.5+dfsg-1ubuntu1) noble; urgency=medium
41+
42+ * Merge with Debian unstable as security update.
43+ Remaining changes:
44+ - Extend ifupdown script to support networkd-dispatcher.
45+ + d/clamav-freshclam-ifupdown: Modernize some parts of
46+ the script. Implement support for networkd-dispatcher.
47+ + d/clamav-freshclam.links: Install the
48+ clamav-freshclam-ifupdown script inside the proper
49+ /usr/lib/networkd-dispatcher/{off,routable}.d/
50+ directories. (LP: 1718227)
51+ - clamav-base.postinst.in: Quell warning from check for clamav user
52+ (LP: 1920217).
53+ - d/p/resolve-armhf-ftbfs.patch: resolve armhf failure to build from
54+ source.
55+
56+ -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Mon, 12 Feb 2024 09:36:24 -0500
57+
58 clamav (1.0.5+dfsg-1) unstable; urgency=medium
59
60 * Import 1.0.4 (Closes: #1063479).
61@@ -25,6 +70,42 @@ clamav (1.0.4+dfsg-1) unstable; urgency=medium
62
63 -- Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Sat, 20 Jan 2024 11:57:33 +0100
64
65+clamav (1.0.4+dfsg-0ubuntu1) noble; urgency=medium
66+
67+ * Updated to version 1.0.4 to fix db compatibility. (LP: #2046581)
68+ - debian/rules: bump CL_FLEVEL to 164.
69+ - debian/libclamav11.symbols: updated CLAMAV_PRIVATE symbols to new
70+ version.
71+ - debian/series/cargo-Remove-windows-referenfes.patch: disabled as
72+ the mentioned files aren't being removed by the debian/get_orig.sh
73+ script, so I assume the Debian maintainer is using a different script
74+ to generate the dfsg tarball.
75+ - debian/series/Freshclam-remove-curl-result-warning.patch: removed,
76+ included in new version.
77+ - Updated patches for new version:
78+ + libclamav-Sort-libclamav.map-and-libfreshclam.map.patch
79+ + libclamav-Add-missing-symbols.patch
80+
81+ -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Thu, 04 Jan 2024 11:04:58 -0500
82+
83+clamav (1.0.3+dfsg-2ubuntu1) noble; urgency=medium
84+
85+ * Merge with Debian unstable as security update (LP: #2040372).
86+ Remaining changes:
87+ - Extend ifupdown script to support networkd-dispatcher.
88+ + d/clamav-freshclam-ifupdown: Modernize some parts of
89+ the script. Implement support for networkd-dispatcher.
90+ + d/clamav-freshclam.links: Install the
91+ clamav-freshclam-ifupdown script inside the proper
92+ /usr/lib/networkd-dispatcher/{off,routable}.d/
93+ directories. (LP: 1718227)
94+ - clamav-base.postinst.in: Quell warning from check for clamav user
95+ (LP: 1920217).
96+ - d/p/resolve-armhf-ftbfs.patch: resolve armhf failure to build from
97+ source.
98+
99+ -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Tue, 12 Dec 2023 10:24:25 -0500
100+
101 clamav (1.0.3+dfsg-2) unstable; urgency=medium
102
103 * Remove unnecessary warning messages in freshclam during update.
104@@ -37,6 +118,29 @@ clamav (1.0.3+dfsg-1) unstable; urgency=medium
105
106 -- Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Sat, 09 Sep 2023 10:18:34 +0200
107
108+clamav (1.0.2+dfsg-1ubuntu1) mantic; urgency=medium
109+
110+ [ Marc Deslauriers ]
111+ * Merge with Debian unstable as security update (LP: #2031565).
112+ Remaining changes:
113+ - Extend ifupdown script to support networkd-dispatcher.
114+ + d/clamav-freshclam-ifupdown: Modernize some parts of
115+ the script. Implement support for networkd-dispatcher.
116+ + d/clamav-freshclam.links: Install the
117+ clamav-freshclam-ifupdown script inside the proper
118+ /usr/lib/networkd-dispatcher/{off,routable}.d/
119+ directories. (LP: 1718227)
120+ - clamav-base.postinst.in: Quell warning from check for clamav user
121+ (LP: 1920217).
122+ - CVE-2023-20197
123+ - CVE-2023-20212
124+
125+ [ Vladimir Petko ]
126+ * d/p/resolve-armhf-ftbfs.patch: resolve armhf failure to build from
127+ source.
128+
129+ -- Marc Deslauriers <marc.deslauriers@ubuntu.com> Wed, 23 Aug 2023 10:44:37 -0400
130+
131 clamav (1.0.2+dfsg-1) unstable; urgency=medium
132
133 * Import 1.0.2 (Closes: #1050057)
134@@ -50,6 +154,21 @@ clamav (1.0.2+dfsg-1) unstable; urgency=medium
135
136 -- Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Sat, 19 Aug 2023 19:07:32 +0200
137
138+clamav (1.0.1+dfsg-2ubuntu1) mantic; urgency=medium
139+
140+ * Merge with Debian unstable (LP: #2018063). Remaining changes:
141+ - Extend ifupdown script to support networkd-dispatcher.
142+ + d/clamav-freshclam-ifupdown: Modernize some parts of
143+ the script. Implement support for networkd-dispatcher.
144+ + d/clamav-freshclam.links: Install the
145+ clamav-freshclam-ifupdown script inside the proper
146+ /usr/lib/networkd-dispatcher/{off,routable}.d/
147+ directories.(LP: #1718227)
148+ - clamav-base.postinst.in: Quell warning from check for clamav user
149+ (LP: #1920217).
150+
151+ -- Vladimir Petko <vladimir.petko@canonical.com> Mon, 31 Jul 2023 09:11:40 +1200
152+
153 clamav (1.0.1+dfsg-2) unstable; urgency=medium
154
155 * Depend on latest libtfm1 (Closes: #1031896, #1027010).
156@@ -134,6 +253,39 @@ clamav (1.0.0+dfsg-1) experimental; urgency=medium
157
158 -- Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Sat, 31 Dec 2022 13:44:59 +0100
159
160+clamav (0.103.8+dfsg-0ubuntu2) mantic; urgency=medium
161+
162+ * Extend ifupdown script to support networkd-dispatcher.
163+ - d/clamav-freshclam-ifupdown: Modernize some parts of
164+ the script. Implement support for networkd-dispatcher.
165+ - d/clamav-freshclam.links: Install the
166+ clamav-freshclam-ifupdown script inside the proper
167+ /usr/lib/networkd-dispatcher/{off,routable}.d/
168+ directories.
169+ (LP: #1718227)
170+
171+ -- Sergio Durigan Junior <sergio.durigan@canonical.com> Fri, 12 May 2023 15:58:29 -0400
172+
173+clamav (0.103.8+dfsg-0ubuntu1) lunar; urgency=medium
174+
175+ * Updated to version 0.103.8 to fix security issues.
176+ - debian/rules: bump CL_FLEVEL to 129.
177+ - debian/libclamav9.symbols: updated CLAMAV_PRIVATE symbols to new
178+ version.
179+ - CVE-2023-20032, CVE-2023-20052
180+
181+ -- David Fernandez Gonzalez <david.fernandezgonzalez@canonical.com> Fri, 24 Feb 2023 09:27:20 +0100
182+
183+clamav (0.103.7+dfsg-1ubuntu1) lunar; urgency=medium
184+
185+ * Merge with Debian unstable (LP: #1993390). Remaining changes:
186+ - clamav-base.postinst.in: Quell warning from check for clamav user
187+ (LP #1920217)
188+ * Dropped:
189+ - Update translations
190+
191+ -- Bryce Harrington <bryce@canonical.com> Fri, 18 Nov 2022 23:35:15 -0800
192+
193 clamav (0.103.7+dfsg-1) unstable; urgency=medium
194
195 * Import 0.103.7
196@@ -141,6 +293,13 @@ clamav (0.103.7+dfsg-1) unstable; urgency=medium
197
198 -- Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Sun, 14 Aug 2022 21:33:51 +0200
199
200+clamav (0.103.6+dfsg-1ubuntu1) kinetic; urgency=medium
201+
202+ * clamav-base.postinst.in: Quell warning from check for clamav user
203+ (LP: #1920217)
204+
205+ -- Bryce Harrington <bryce@canonical.com> Wed, 18 May 2022 17:26:41 -0700
206+
207 clamav (0.103.6+dfsg-1) unstable; urgency=medium
208
209 * Import 0.103.6
210diff --git a/debian/clamav-base.postinst.in b/debian/clamav-base.postinst.in
211index 89c116f..f3d1da9 100644
212--- a/debian/clamav-base.postinst.in
213+++ b/debian/clamav-base.postinst.in
214@@ -32,7 +32,7 @@ case "$1" in
215
216 # Set up the clamav user on new install
217 if [ -z "$2" ]; then
218- if ! id clamav; then
219+ if ! getent passwd clamav >/dev/null; then
220 adduser --system --no-create-home --quiet \
221 --disabled-password --disabled-login \
222 --shell /bin/false --group --home /var/lib/clamav clamav
223diff --git a/debian/clamav-freshclam-ifupdown b/debian/clamav-freshclam-ifupdown
224index 875c0cc..232fd79 100755
225--- a/debian/clamav-freshclam-ifupdown
226+++ b/debian/clamav-freshclam-ifupdown
227@@ -1,16 +1,25 @@
228 #!/bin/sh
229 # 2004-01-25, Thomas Lamy <thomas.lamy@in-online.net>
230 # From Magnus Ekdahl's <magnus@debian.org> clamav-freshclam-handledaemon(8)
231+# Adjust to be networkd-dispatcher compatible by
232+# Sergio Durigan Junior <sergiodj@debian.org>
233
234 set -e
235
236-[ -e /var/lib/clamav/interface ] || exit 0
237+[ -f /var/lib/clamav/interface ] || exit 0
238+
239+if [ -d /run/systemd/system ]; then
240+ INIT='systemctl'
241+ INIT_SUFFIX='clamav-freshclam'
242+else
243+ INIT='invoke-rc.d clamav-freshclam'
244+ INIT_SUFFIX=''
245+fi
246
247-INIT=invoke-rc.d clamav-freshclam
248 CLAMAV_CONF_FILE=/etc/clamav/clamd.conf
249 FRESHCLAM_CONF_FILE=/etc/clamav/freshclam.conf
250
251-INTERNETIFACE=`cat /var/lib/clamav/interface`
252+INTERNETIFACE=$(cat /var/lib/clamav/interface)
253
254 if grep -q freshclam /proc/*/stat 2>/dev/null; then
255 IS_RUNNING=true
256@@ -18,61 +27,104 @@ else
257 IS_RUNNING=false
258 fi
259
260-# $IFACE is set by ifup/down, $PPP_IFACE by pppd
261-[ -n "$PPP_IFACE" ] && IFACE=$PPP_IFACE
262+handle_ifupdown ()
263+{
264+ # $IFACE is set by ifup/down, $PPP_IFACE by pppd
265+ [ -n "$PPP_IFACE" ] && IFACE=$PPP_IFACE
266
267-# This is sloppy - woody's pppd exports variables, while sid's passes them as
268-# arguments and exports them.
269+ # This is sloppy - woody's pppd exports variables, while sid's passes them as
270+ # arguments and exports them.
271
272-if [ "$1" = "$IFACE" ]; then # We're called by sid's pppd
273- shift 6 # and we already know the interface
274-fi # Dump the arguments passed.
275+ if [ "$1" = "$IFACE" ]; then # We're called by sid's pppd
276+ shift 6 # and we already know the interface
277+ fi # Dump the arguments passed.
278+
279+ if [ -z "$1" ]; then
280+ case $(dirname "$0") in
281+ */if-up.d|*/ip-up.d)
282+ # Short circuit and exit early if freshclam is already running
283+ [ "$IS_RUNNING" = 'true' ] && exit 0
284+ for interface in $INTERNETIFACE; do
285+ if [ "$interface" = "$IFACE" ]; then
286+ FMODE=start
287+ break
288+ else
289+ FMODE=skip
290+ fi
291+ done
292+ ;;
293+ */if-down.d|*/ip-down.d)
294+ # Short circuit and exit early if freshclam is not already running
295+ [ "$IS_RUNNING" = 'false' ] && exit 0
296+ for interface in $INTERNETIFACE; do
297+ if [ "$interface" = "$IFACE" ]; then
298+ FMODE=stop
299+ break
300+ else
301+ FMODE=skip
302+ fi
303+ done
304+ ;;
305+ *)
306+ FMODE=skip
307+ ;;
308+ esac
309+ else
310+ FMODE="$1"
311+ fi
312+
313+ case "$FMODE" in
314+ start|stop)
315+ IFACE="$IFACE" $INIT $FMODE $INIT_SUFFIX
316+ ;;
317+ skip)
318+ ;;
319+ *)
320+ echo "Usage: $0 {start|stop|skip}" >&2
321+ exit 1
322+ ;;
323+ esac
324+}
325+
326+handle_networkd_dispatcher ()
327+{
328+ FOUND_IFACE=false
329
330-if [ -z "$1" ]; then
331- case $(dirname "$0") in
332- */if-up.d|*/ip-up.d)
333- # Short circuit and exit early if freshclam is already running
334- [ "$IS_RUNNING" = 'true' ] && exit 0
335- for interface in $INTERNETIFACE; do
336- if [ "$interface" = "$IFACE" ]; then
337- FMODE=start
338- break
339- else
340- FMODE=skip
341- fi
342- done
343- ;;
344- */if-down.d|*/ip-down.d)
345- # Short circuit and exit early if freshclam is not already running
346- [ "$IS_RUNNING" = 'false' ] && exit 0
347 for interface in $INTERNETIFACE; do
348- if [ "$interface" = "$IFACE" ]; then
349- FMODE=stop
350- break
351- else
352- FMODE=skip
353- fi
354+ if [ "$interface" = "$IFACE" ]; then
355+ FOUND_IFACE=true
356+ break
357+ fi
358 done
359- ;;
360- *)
361- FMODE=skip
362- ;;
363- esac
364+
365+ [ "$FOUND_IFACE" = 'false' ] && return
366+
367+ FMODE=""
368+
369+ case "$STATE" in
370+ "off")
371+ if [ "$IS_RUNNING" = 'true' ]; then
372+ FMODE="stop"
373+ fi
374+ ;;
375+ "routable")
376+ if [ "$IS_RUNNING" = 'false' ]; then
377+ FMODE="start"
378+ fi
379+ ;;
380+ *)
381+ return
382+ esac
383+
384+ if [ -n "$FMODE" ]; then
385+ IFACE="$IFACE" $INIT $FMODE $INIT_SUFFIX
386+ fi
387+}
388+
389+if [ -n "$STATE" ]; then
390+ handle_networkd_dispatcher "$@"
391 else
392- FMODE="$1"
393+ handle_ifupdown "$@"
394 fi
395
396-case "$FMODE" in
397- start|stop)
398- IFACE="$IFACE" $INIT $FMODE
399- ;;
400- skip)
401- ;;
402- *)
403- echo "Usage: $0 {start|stop|skip}" >&2
404- exit 1
405- ;;
406-esac
407-
408 exit 0
409-
410diff --git a/debian/clamav-freshclam.links b/debian/clamav-freshclam.links
411index 78dfff6..3f0cfff 100644
412--- a/debian/clamav-freshclam.links
413+++ b/debian/clamav-freshclam.links
414@@ -1 +1,4 @@
415 /usr/share/doc/clamav-base/README.Debian.gz /usr/share/doc/clamav-freshclam/README.Debian.gz
416+/usr/share/doc/clamav-base/NEWS.gz /usr/share/doc/clamav-freshclam/NEWS.gz
417+/etc/network/if-up.d/clamav-freshclam-ifupdown /usr/lib/networkd-dispatcher/routable.d/clamav-freshclam
418+/etc/network/if-down.d/clamav-freshclam-ifupdown /usr/lib/networkd-dispatcher/off.d/clamav-freshclam
419diff --git a/debian/control b/debian/control
420index 171daa5..7f7093c 100644
421--- a/debian/control
422+++ b/debian/control
423@@ -1,7 +1,8 @@
424 Source: clamav
425 Section: utils
426 Priority: optional
427-Maintainer: ClamAV Team <pkg-clamav-devel@lists.alioth.debian.org>
428+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
429+XSBC-Original-Maintainer: ClamAV Team <pkg-clamav-devel@lists.alioth.debian.org>
430 Uploaders: Michael Meskes <meskes@debian.org>,
431 Michael Tautschnig <mt@debian.org>,
432 Scott Kitterman <scott@kitterman.com>,
433diff --git a/debian/patches/resolve-armhf-ftbfs.patch b/debian/patches/resolve-armhf-ftbfs.patch
434new file mode 100644
435index 0000000..4141f54
436--- /dev/null
437+++ b/debian/patches/resolve-armhf-ftbfs.patch
438@@ -0,0 +1,40 @@
439+Description: resolve armhf failure to build from source.
440+Author: Vladimir Petko <vladimir.petko@canonical.com>
441+
442+--- a/libclamav/special.c
443++++ b/libclamav/special.c
444+@@ -48,7 +48,8 @@
445+
446+ int cli_check_mydoom_log(cli_ctx *ctx)
447+ {
448+- const uint32_t *record;
449++ const uint32_t record[16];
450++ const uint32_t mask = 0xffffffff;
451+ uint32_t check, key;
452+ fmap_t *map = ctx->fmap;
453+ unsigned int blocks = map->len / (8 * 4);
454+@@ -59,14 +60,20 @@
455+ if (blocks > 5)
456+ blocks = 5;
457+
458+- record = fmap_need_off_once(map, 0, 8 * 4 * blocks);
459+- if (!record)
460++ // returns unaligned memory block
461++ const char* data = fmap_need_off_once(map, 0, 8 * 4 * blocks);
462++ if (!data)
463+ return CL_CLEAN;
464++
465+ while (blocks) { /* This wasn't probably intended but that's what the current code does anyway */
466+- if (record[--blocks] == 0xffffffff)
467++ unsigned int offset = --blocks;
468++ offset *=sizeof(uint32_t);
469++ // safe (but slow) on unaligned memory
470++ if (!memcmp(&data[offset], &mask, sizeof(uint32_t)))
471+ return CL_CLEAN;
472+ }
473+-
474++ // copy into aligned array to perform bit operations
475++ memcpy(record, data, sizeof(record));
476+ key = ~be32_to_host(record[0]);
477+ check = (be32_to_host(record[1]) ^ key) +
478+ (be32_to_host(record[2]) ^ key) +
479diff --git a/debian/patches/series b/debian/patches/series
480index 959f698..04964a7 100644
481--- a/debian/patches/series
482+++ b/debian/patches/series
483@@ -6,3 +6,4 @@ libclamav-pe-Use-endian-wrapper-in-more-places.patch
484 Add-an-option-to-avoid-setting-RPATH-on-unix-systems.patch
485 libclamav-Use-OpenSSL-BN-instead-tomfastmath.patch
486 Remove-bundled-tomfastmath-library.patch
487+resolve-armhf-ftbfs.patch

Subscribers

People subscribed via source and target branches