git: iscsi_initiator(4): Fix a potential NULL pointer dereference.

Sascha Wildner swildner at crater.dragonflybsd.org
Sun Aug 29 12:15:58 PDT 2010


commit 8e44e5711c1cd574d2c6dc46faa819b9f2c2f498
Author: Sascha Wildner <saw at online.de>
Date:   Sun Aug 29 21:13:27 2010 +0200

    iscsi_initiator(4): Fix a potential NULL pointer dereference.
    
    If sp can be NULL (as the rest of the code suggests), we can't use sdebug()
    since that prints the string with sp->sid prepended (thereby dereferencing
    NULL).
    
    Instead, use debug() and add sp->sid to its string (with a check for NULL).
    
    While here, fix some indentation issues.

Summary of changes:
 sys/dev/disk/iscsi/initiator/isc_soc.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8e44e5711c1cd574d2c6dc46faa819b9f2c2f498


-- 
DragonFly BSD source repository





More information about the Commits mailing list