diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2006-01-12 13:18:49 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2006-01-12 13:18:49 +0000 |
| commit | e4846391dac1347698a8c0e1690eaa9a1a4ae6fb (patch) | |
| tree | 0f44309cf05941140128f17ab9c0bd112052eee3 | |
| parent | a9f4f750ff8109e988abea1b5873f1e52e2bd591 (diff) | |
Notes
| -rw-r--r-- | sys/boot/common/module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/boot/common/module.c b/sys/boot/common/module.c index ae93426848a5..adeb1b8ca811 100644 --- a/sys/boot/common/module.c +++ b/sys/boot/common/module.c @@ -864,7 +864,8 @@ moduledir_readhints(struct moduledir *mdp) if (mdp->d_hints != NULL || (mdp->d_flags & MDIR_NOHINTS)) return; path = moduledir_fullpath(mdp, "linker.hints"); - if (stat(path, &st) != 0 || st.st_size < (sizeof(version) + sizeof(int)) || + if (stat(path, &st) != 0 || + st.st_size < (ssize_t)(sizeof(version) + sizeof(int)) || st.st_size > 100 * 1024 || (fd = open(path, O_RDONLY)) < 0) { free(path); mdp->d_flags |= MDIR_NOHINTS; |
