librpc: prevent invalid NULL pointer derref in dcerpc_binding_get_auth_info().
authorGünther Deschner <gd@samba.org>
Wed, 1 Jul 2015 15:14:10 +0000 (17:14 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 2 Jul 2015 00:05:37 +0000 (02:05 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul  2 02:05:38 CEST 2015 on sn-devel-104

librpc/rpc/binding.c

index 37e0c4f54f6722abc5cd661d9ec6fbcedc027238..f131d00a88c22a5b8f86667a3246137066ab21ca 100644 (file)
@@ -596,11 +596,11 @@ _PUBLIC_ void dcerpc_binding_get_auth_info(const struct dcerpc_binding *b,
                auth_level = DCERPC_AUTH_LEVEL_NONE;
        }
 
-       if (_auth_type == NULL) {
+       if (_auth_type != NULL) {
                *_auth_type = auth_type;
        }
 
-       if (_auth_level == NULL) {
+       if (_auth_level != NULL) {
                *_auth_level = auth_level;
        }
 }