summaryrefslogtreecommitdiff
path: root/mail/spamguard/files/patch-functions.h
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-09-23 14:15:14 +0000
committerStefan Eßer <se@FreeBSD.org>2020-09-23 14:15:14 +0000
commit6a919278eb06549eaa75f2c3e2e4496f00cfd96a (patch)
tree73b5f7573f07b621b06b0728352011756528fcdd /mail/spamguard/files/patch-functions.h
parent- Update to 1.1.0 (diff)
Fix build with -fno-common and correct software bugs
There were software bugs in 3 source files, most due to wrong use of sizeof (e.g. using the size of a pointer instead of the data, or subtracting a value from the argument of sizeof, not the resulting size value. A test for a short write assigned the length written to a variable and performed a comparison with that variable in a single expression and with no defined order of the these two operations resulting in either a comparison with 0 (the value before assignement) or with the just assigned value (tautological comparison). Either case did not catch a short write. I have not checked the quality of the code nay further than these issues that caused compiler warnings, but given the severity and fundamental lack of understanding shown by these examples, I'm not convinced that this program can be trusted to work correctly.
Notes
Notes: svn path=/head/; revision=549729
Diffstat (limited to 'mail/spamguard/files/patch-functions.h')
-rw-r--r--mail/spamguard/files/patch-functions.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/mail/spamguard/files/patch-functions.h b/mail/spamguard/files/patch-functions.h
new file mode 100644
index 000000000000..b95b2bf81277
--- /dev/null
+++ b/mail/spamguard/files/patch-functions.h
@@ -0,0 +1,13 @@
+--- functions.h.orig 2007-05-07 06:38:05 UTC
++++ functions.h
+@@ -28,8 +28,8 @@ struct iaddr {
+ iaddr *next;
+ };
+
+-maddr *spammer_hash[MAXADDR];
+-iaddr *iaddrlist;
++extern maddr *spammer_hash[MAXADDR];
++extern iaddr *iaddrlist;
+
+
+ int