Ignore:
Timestamp:
Jul 6, 2011, 8:21:13 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update trunk to 3.5.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/smbd/sesssetup.c

    r590 r599  
    11061106
    11071107        asn1_load(data, *pblob);
    1108         asn1_start_tag(data, pblob->data[0]);
    1109         if (data->has_error || data->nesting == NULL) {
     1108        if (asn1_start_tag(data, pblob->data[0])) {
     1109                /* asn1_start_tag checks if the given
     1110                   length of the blob is enough to complete
     1111                   the tag. If it returns true we know
     1112                   there is nothing to do - the blob is
     1113                   complete. */
    11101114                asn1_free(data);
    1111                 /* Let caller catch. */
    11121115                return NT_STATUS_OK;
    11131116        }
     1117
     1118        if (data->nesting == NULL) {
     1119                /* Incorrect tag, allocation failed,
     1120                   or reading the tag length failed.
     1121                   Let the caller catch. */
     1122                asn1_free(data);
     1123                return NT_STATUS_OK;
     1124        }
     1125
     1126        /* Here we know asn1_start_tag() has set data->has_error to true.
     1127           asn1_tag_remaining() will have failed due to the given blob
     1128           being too short. We need to work out how short. */
    11141129
    11151130        /* Integer wrap paranoia.... */
     
    11411156        if (needed_len <= pblob->length) {
    11421157                /* Nothing to do - blob is complete. */
     1158                /* THIS SHOULD NOT HAPPEN - asn1_start_tag()
     1159                   above should have caught this !!! */
     1160                DEBUG(0,("check_spnego_blob_complete: logic "
     1161                        "error (needed_len = %u, "
     1162                        "pblob->length = %u).\n",
     1163                        (unsigned int)needed_len,
     1164                        (unsigned int)pblob->length ));
    11431165                return NT_STATUS_OK;
    11441166        }
Note: See TracChangeset for help on using the changeset viewer.