diff options
author | Stef Walter <stef@memberwebs.com> | 2004-08-25 23:28:39 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-08-25 23:28:39 +0000 |
commit | c8cd96ec4a349ea032dbcadb9730a3522a1c2bc7 (patch) | |
tree | d0ed59df7500340aeae59cd398dc5f4b501f3c93 /common | |
parent | df0df5f265e9a14ae1e63c771520da84feb654bf (diff) |
Safer line length
Diffstat (limited to 'common')
-rw-r--r-- | common/smtppass.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/common/smtppass.h b/common/smtppass.h index 6c08ef4..4c581d2 100644 --- a/common/smtppass.h +++ b/common/smtppass.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 { |