diff options
author | 2003-05-08 21:04:17 +0000 | |
---|---|---|
committer | 2003-05-08 21:04:17 +0000 | |
commit | 0a84d89213c86ca8455c0dd9ba810084fc321b66 (patch) | |
tree | 1afdf79caeb3d4939fe75a4b98209d3aaced2369 | |
parent | Update to 1.6.7p5 (diff) | |
download | wireguard-openbsd-0a84d89213c86ca8455c0dd9ba810084fc321b66.tar.xz wireguard-openbsd-0a84d89213c86ca8455c0dd9ba810084fc321b66.zip |
multiple readlink() calls that forgot the -1...
ok millert
-rw-r--r-- | gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.c | 2 | ||||
-rw-r--r-- | gnu/usr.sbin/mkhybrid/src/rock.c | 4 | ||||
-rw-r--r-- | gnu/usr.sbin/mkhybrid/src/tree.c | 4 | ||||
-rw-r--r-- | kerberosIV/src/appl/ftp/ftpd/ls.c | 2 | ||||
-rw-r--r-- | kerberosV/src/appl/ftp/ftpd/ls.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.c index ee8da85d810..40fa3826bac 100644 --- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.c +++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTFile.c @@ -274,7 +274,7 @@ PRIVATE void LYListFmtParse ARGS5( *buf = '\0'; #ifdef S_IFLNK if (c != 'A' && S_ISLNK(st.st_mode) && - (len = readlink(file, tmp, sizeof(tmp))) >= 0) { + (len = readlink(file, tmp, sizeof(tmp) - 1)) >= 0) { PUTS(" -> "); tmp[len] = '\0'; PUTS(tmp); diff --git a/gnu/usr.sbin/mkhybrid/src/rock.c b/gnu/usr.sbin/mkhybrid/src/rock.c index bc7a5aef338..6eecfe5bef6 100644 --- a/gnu/usr.sbin/mkhybrid/src/rock.c +++ b/gnu/usr.sbin/mkhybrid/src/rock.c @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -static char rcsid[] ="$Id: rock.c,v 1.1 2000/10/10 20:40:21 beck Exp $"; +static char rcsid[] ="$Id: rock.c,v 1.2 2003/05/08 21:04:17 vincent Exp $"; #include <stdlib.h> @@ -338,7 +338,7 @@ int deep_opt; int lenpos, lenval, j0, j1; int nchar; unsigned char * cpnt, *cpnt1; - nchar = readlink(whole_name, (char *)symlink_buff, sizeof(symlink_buff)); + nchar = readlink(whole_name, (char *)symlink_buff, sizeof(symlink_buff)-1); symlink_buff[nchar < 0 ? 0 : nchar] = 0; nchar = strlen((char *) symlink_buff); set_733(s_entry->isorec.size, 0); diff --git a/gnu/usr.sbin/mkhybrid/src/tree.c b/gnu/usr.sbin/mkhybrid/src/tree.c index 2b302197299..db5d93f0176 100644 --- a/gnu/usr.sbin/mkhybrid/src/tree.c +++ b/gnu/usr.sbin/mkhybrid/src/tree.c @@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -static char rcsid[] ="$Id: tree.c,v 1.1 2000/10/10 20:40:21 beck Exp $"; +static char rcsid[] ="$Id: tree.c,v 1.2 2003/05/08 21:04:17 vincent Exp $"; /* ADD_FILES changes made by Ross Biro biro@yggdrasil.com 2/23/95 */ @@ -1572,7 +1572,7 @@ FDECL3(insert_file_entry,struct directory *, this_dir, case S_IFLNK: nchar = readlink(whole_path, (char *)symlink_buff, - sizeof(symlink_buff)); + sizeof(symlink_buff)-1); symlink_buff[nchar < 0 ? 0 : nchar] = 0; sprintf(buffer,"L\t%s\t%s\n", s_entry->name, symlink_buff); diff --git a/kerberosIV/src/appl/ftp/ftpd/ls.c b/kerberosIV/src/appl/ftp/ftpd/ls.c index 81d60b7e892..a43ea6ce5b2 100644 --- a/kerberosIV/src/appl/ftp/ftpd/ls.c +++ b/kerberosIV/src/appl/ftp/ftpd/ls.c @@ -264,7 +264,7 @@ make_fileinfo(FILE *out, const char *filename, struct fileinfo *file, int flags) } if(S_ISLNK(st->st_mode)) { int n; - n = readlink((char *)filename, buf, sizeof(buf)); + n = readlink((char *)filename, buf, sizeof(buf) - 1); if(n >= 0) { buf[n] = '\0'; file->link = strdup(buf); diff --git a/kerberosV/src/appl/ftp/ftpd/ls.c b/kerberosV/src/appl/ftp/ftpd/ls.c index 81992a95595..fff33b4c8a6 100644 --- a/kerberosV/src/appl/ftp/ftpd/ls.c +++ b/kerberosV/src/appl/ftp/ftpd/ls.c @@ -263,7 +263,7 @@ make_fileinfo(FILE *out, const char *filename, struct fileinfo *file, int flags) } if(S_ISLNK(st->st_mode)) { int n; - n = readlink((char *)filename, buf, sizeof(buf)); + n = readlink((char *)filename, buf, sizeof(buf) - 1); if(n >= 0) { buf[n] = '\0'; file->link = strdup(buf); |