summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2011-11-09 15:34:19 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2011-11-09 15:34:19 +0000
commit19ead3b1a73134680c924a2e9a4d05d8a9bc3116 (patch)
tree8126f0373bde44a17bf9654a9a038820c71d8387 /include
parent9b252b44c6433fe45d62ab5572a2765336826fc5 (diff)
getcwd() buffer's length can be smaller than 1024. In that case it will
fail with errno set to ERANGE if not enough room is provided. Similar for getlogin_r() so remove minbytes enforcement attribute. ok kettenis@ guenther@ deraadt@ on getcwd, deraadt@ on getlogin_r.
Diffstat (limited to 'include')
-rw-r--r--include/unistd.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/unistd.h b/include/unistd.h
index 3c27f525ab7..b08399c3d2f 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: unistd.h,v 1.65 2011/07/18 17:29:49 matthew Exp $ */
+/* $OpenBSD: unistd.h,v 1.66 2011/11/09 15:34:18 fgsch Exp $ */
/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */
/*-
@@ -85,8 +85,7 @@ int execvp(const char *, char * const *);
pid_t fork(void);
long fpathconf(int, int);
char *getcwd(char *, size_t)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,1,1024)));
+ __attribute__((__bounded__(__string__,1,2)));
gid_t getegid(void);
uid_t geteuid(void);
gid_t getgid(void);
@@ -139,8 +138,7 @@ extern char *suboptarg; /* getsubopt(3) external variable */
int fsync(int);
int ftruncate(int, off_t);
int getlogin_r(char *, size_t)
- __attribute__((__bounded__(__string__,1,2)))
- __attribute__((__bounded__(__minbytes__,1,32)));
+ __attribute__((__bounded__(__string__,1,2)));
#endif
#if __XPG_VISIBLE || __BSD_VISIBLE