summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/ufs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/lib/libsa/ufs.c')
-rw-r--r--sys/lib/libsa/ufs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/lib/libsa/ufs.c b/sys/lib/libsa/ufs.c
index 7516651e218..2b97c510d7e 100644
--- a/sys/lib/libsa/ufs.c
+++ b/sys/lib/libsa/ufs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs.c,v 1.24 2014/07/22 18:03:03 deraadt Exp $ */
+/* $OpenBSD: ufs.c,v 1.25 2015/07/17 18:55:00 kspillner Exp $ */
/* $NetBSD: ufs.c,v 1.16 1996/09/30 16:01:22 ws Exp $ */
/*-
@@ -465,8 +465,8 @@ ufs_open(char *path, struct open_file *f)
* Check for symbolic link.
*/
if ((fp->f_di.di_mode & IFMT) == IFLNK) {
- int link_len = fp->f_di.di_size;
- int len;
+ u_int64_t link_len = fp->f_di.di_size;
+ size_t len;
len = strlen(cp);
@@ -479,8 +479,7 @@ ufs_open(char *path, struct open_file *f)
bcopy(cp, &namebuf[link_len], len + 1);
if (link_len < fs->fs_maxsymlinklen) {
- bcopy(fp->f_di.di_shortlink, namebuf,
- (unsigned) link_len);
+ bcopy(fp->f_di.di_shortlink, namebuf, link_len);
} else {
/*
* Read file for symbolic link
@@ -502,7 +501,7 @@ ufs_open(char *path, struct open_file *f)
if (rc)
goto out;
- bcopy(buf, namebuf, (unsigned)link_len);
+ bcopy(buf, namebuf, link_len);
}
/*