summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clamsmtpd.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/clamsmtpd.h b/src/clamsmtpd.h
index 6c08ef4..4c581d2 100644
--- a/src/clamsmtpd.h
+++ b/src/clamsmtpd.h
@@ -39,8 +39,17 @@
#ifndef __CLAMSMTPD_H__
#define __CLAMSMTPD_H__
-/* A generous maximum line length. */
-#define LINE_LENGTH 2000
+/*
+ * A generous maximum line length. It needs to be longer than
+ * a full path on this system can be, because we pass the file
+ * name to clamd.
+ */
+
+#if 2000 > MAXPATHLEN
+ #define LINE_LENGTH 2000
+#else
+ #define LINE_LENGTH (MAXPATHLEN + 128)
+#endif
typedef struct clamsmtp_context
{