diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-20 17:37:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-20 17:37:55 +0000 |
commit | ee84f1cbaf28a0c8511dd2de2685028d389414b2 (patch) | |
tree | 0f2893c7931f5e91baa8636ffb931a4c90730812 /usr.sbin/smtpd/util.c | |
parent | 52ef1f80c283aa859feb09537098b134f58707fc (diff) |
use <limits.h> comprehensively. For now try to push <> includes to
each .c file, and out of the .h files. To avoid overinclude.
ok gilles, in principle. If this has been done right, -portable should
become easier to maintain.
Diffstat (limited to 'usr.sbin/smtpd/util.c')
-rw-r--r-- | usr.sbin/smtpd/util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c index 9f8c86c97e8..419a6aa6ba6 100644 --- a/usr.sbin/smtpd/util.c +++ b/usr.sbin/smtpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.111 2015/01/16 06:40:21 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.112 2015/01/20 17:37:54 deraadt Exp $ */ /* * Copyright (c) 2000,2001 Markus Friedl. All rights reserved. @@ -187,7 +187,7 @@ mkdirs_component(char *path, mode_t mode) int mkdirs(char *path, mode_t mode) { - char buf[SMTPD_MAXPATHLEN]; + char buf[PATH_MAX]; int i = 0; int done = 0; char *p; @@ -345,7 +345,7 @@ mvpurge(char *from, char *to) size_t n; int retry; const char *sep; - char buf[SMTPD_MAXPATHLEN]; + char buf[PATH_MAX]; if ((n = strlen(to)) == 0) fatalx("to is empty"); @@ -375,7 +375,7 @@ again: int mktmpfile(void) { - char path[SMTPD_MAXPATHLEN]; + char path[PATH_MAX]; int fd; mode_t omode; @@ -698,7 +698,7 @@ parse_smtp_response(char *line, size_t len, char **msg, int *cont) { size_t i; - if (len >= SMTPD_MAXLINESIZE) + if (len >= LINE_MAX) return "line too long"; if (len > 3) { |