]> git.sur5r.net Git - openldap/commitdiff
ITS#6863, fix crashes in ITS#6714 patch. From Jan Vcelak @ Red Hat
authorHoward Chu <hyc@openldap.org>
Wed, 16 Mar 2011 18:23:26 +0000 (18:23 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 16 Mar 2011 18:23:26 +0000 (18:23 +0000)
libraries/libldap/tls_m.c

index 6d1c0a4ca114195ec7e990e685cab91bbb8e56de..911885ddcd5c80edffd749234852215c503d93cc 100644 (file)
@@ -2272,7 +2272,7 @@ tlsm_is_non_ssl_message( PRFileDesc *fd, ber_tag_t *thebyte )
        }
 
        if ( p->firsttag == LBER_SEQUENCE ) {
-               if ( *thebyte ) {
+               if ( thebyte ) {
                        *thebyte = p->firsttag;
                }
                return 1;
@@ -2769,7 +2769,7 @@ tlsm_PR_GetSocketOption(PRFileDesc *fd, PRSocketOptionData *data)
        struct tls_data         *p;
        p = tlsm_get_pvt_tls_data( fd );
 
-       if ( !data ) {
+       if ( p == NULL || data == NULL ) {
                return PR_FAILURE;
        }