mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Fix panic on invalid 'mdconfig -at preload' usage.
PR: kern/80136
This commit is contained in:
parent
bd2c49af72
commit
5ed1eb2bb0
1 changed files with 2 additions and 0 deletions
|
|
@ -814,6 +814,8 @@ mdcreate_preload(struct md_s *sc, struct md_ioctl *mdio)
|
|||
|
||||
if (mdio->md_options & ~(MD_AUTOUNIT | MD_FORCE))
|
||||
return (EINVAL);
|
||||
if (mdio->md_base == 0)
|
||||
return (EINVAL);
|
||||
sc->flags = mdio->md_options & MD_FORCE;
|
||||
/* Cast to pointer size, then to pointer to avoid warning */
|
||||
sc->pl_ptr = (u_char *)(uintptr_t)mdio->md_base;
|
||||
|
|
|
|||
Loading…
Reference in a new issue