Skip to content

Commit

Permalink
HBSD: change vfs_setopt{,_part}(...)'s len type, to check boundaries,…
Browse files Browse the repository at this point in the history
… and follow bcopy(...)'s expectation

FreeBSD-PR: 196474
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
  • Loading branch information
opntr committed Jan 4, 2015
1 parent f4199c2 commit 7cc6ffb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sys/kern/vfs_mount.c
Expand Up @@ -1611,7 +1611,7 @@ vfs_scanopt(struct vfsoptlist *opts, const char *name, const char *fmt, ...)
}

int
vfs_setopt(struct vfsoptlist *opts, const char *name, void *value, int len)
vfs_setopt(struct vfsoptlist *opts, const char *name, void *value, size_t len)
{
struct vfsopt *opt;

Expand All @@ -1632,7 +1632,7 @@ vfs_setopt(struct vfsoptlist *opts, const char *name, void *value, int len)
}

int
vfs_setopt_part(struct vfsoptlist *opts, const char *name, void *value, int len)
vfs_setopt_part(struct vfsoptlist *opts, const char *name, void *value, size_t len)
{
struct vfsopt *opt;

Expand Down
4 changes: 2 additions & 2 deletions sys/sys/mount.h
Expand Up @@ -856,9 +856,9 @@ int vfs_filteropt(struct vfsoptlist *, const char **legal);
void vfs_opterror(struct vfsoptlist *opts, const char *fmt, ...);
int vfs_scanopt(struct vfsoptlist *opts, const char *name, const char *fmt, ...);
int vfs_setopt(struct vfsoptlist *opts, const char *name, void *value,
int len);
size_t len);
int vfs_setopt_part(struct vfsoptlist *opts, const char *name, void *value,
int len);
size_t len);
int vfs_setopts(struct vfsoptlist *opts, const char *name,
const char *value);
int vfs_setpublicfs /* set publicly exported fs */
Expand Down

0 comments on commit 7cc6ffb

Please sign in to comment.