diff options
author | Jeremy Allison <jra@samba.org> | 2006-08-29 00:53:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:57 -0500 |
commit | 0362fde476733bacfd7aa2d5eba24597a7f4fd56 (patch) | |
tree | 59b39b66c4e572f85138f2147d03a766f831b6e5 /source3 | |
parent | 8e0a4e7e6f8935b41e6e4ca77ef75f3e766d6eef (diff) | |
download | samba-0362fde476733bacfd7aa2d5eba24597a7f4fd56.tar.gz samba-0362fde476733bacfd7aa2d5eba24597a7f4fd56.tar.bz2 samba-0362fde476733bacfd7aa2d5eba24597a7f4fd56.zip |
r17899: Fix Stanford checker bug - possible null deref.
Jeremy.
(This used to be commit e77949175144cbe4cfa58788d13acc704eebc251)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libads/sasl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c index 3c0bea93d6..b2613071b7 100644 --- a/source3/libads/sasl.c +++ b/source3/libads/sasl.c @@ -276,7 +276,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) int i=0; int gss_rc, rc; uint8 *p; - uint32 max_msg_size; + uint32 max_msg_size = 0; char *sname; ADS_STATUS status; krb5_principal principal; @@ -389,7 +389,10 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) #if 0 file_save("sasl_gssapi.dat", output_token.value, output_token.length); #endif - max_msg_size = (p[1]<<16) | (p[2]<<8) | p[3]; + + if (p) { + max_msg_size = (p[1]<<16) | (p[2]<<8) | p[3]; + } gss_release_buffer(&minor_status, &output_token); |