git: usr.sbin/makefs/hammer2: Fix assert bug when running ioctl commands

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sun Jun 18 21:10:29 PDT 2023


commit 70e962f72e588a76ccc2d1efabbe00ff5a7203a5
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Sun Jun 18 21:02:33 2023 -0700

    usr.sbin/makefs/hammer2: Fix assert bug when running ioctl commands
    
    The dir pointer should be NULL when running HAMMER2 ioctl command
    with "--" for directory, and in that case assert(dir!=NULL) in common
    paths are wrong.
    
    Only seen this on OpenBSD which means only OpenBSD had NULL for
    an uninitialized pointer in stack.
    
    --
    assertion "dir != NULL" failed: file "hammer2.c", line 269, function "hammer2_makefs"
    assertion "dir != NULL" failed: file "hammer2.c", line 658, function "hammer2_validate"

Summary of changes:
 usr.sbin/makefs/hammer2.c | 5 ++---
 usr.sbin/makefs/makefs.c  | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/70e962f72e588a76ccc2d1efabbe00ff5a7203a5


-- 
DragonFly BSD source repository


More information about the Commits mailing list