diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-07-06 01:01:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:51 -0500 |
commit | 3acfc94511cd963597f02d34742dea5d8ed2d609 (patch) | |
tree | b89dafb053a9f31d2838462124a1038c6321d2b9 /source4 | |
parent | 1828f5d50696682be5f81408fe3cc0dd44d8406e (diff) | |
download | samba-3acfc94511cd963597f02d34742dea5d8ed2d609.tar.gz samba-3acfc94511cd963597f02d34742dea5d8ed2d609.tar.bz2 samba-3acfc94511cd963597f02d34742dea5d8ed2d609.zip |
r1349: don't segfault with empty data_blob
metze
(This used to be commit a826accd55e90cb0628f198886ba1ae6c845e68b)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/auth/spnego_parse.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/libcli/auth/spnego_parse.c b/source4/libcli/auth/spnego_parse.c index 85e18ed4da..b38226c014 100644 --- a/source4/libcli/auth/spnego_parse.c +++ b/source4/libcli/auth/spnego_parse.c @@ -250,6 +250,11 @@ ssize_t spnego_read_data(DATA_BLOB data, struct spnego_data *token) ZERO_STRUCTP(token); ZERO_STRUCT(asn1); + + if (data.length == 0) { + return ret; + } + asn1_load(&asn1, data); switch (asn1.data[asn1.ofs]) { |