svn commit: samba r14859 - in branches/SAMBA_4_0/source/libcli/raw:
.
metze at samba.org
metze at samba.org
Sun Apr 2 11:19:22 GMT 2006
Author: metze
Date: 2006-04-02 11:19:21 +0000 (Sun, 02 Apr 2006)
New Revision: 14859
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14859
Log:
fix bugs noticed by the ibm code checker
metze
Modified:
branches/SAMBA_4_0/source/libcli/raw/rawrequest.c
Changeset:
Modified: branches/SAMBA_4_0/source/libcli/raw/rawrequest.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/rawrequest.c 2006-04-02 11:18:34 UTC (rev 14858)
+++ branches/SAMBA_4_0/source/libcli/raw/rawrequest.c 2006-04-02 11:19:21 UTC (rev 14859)
@@ -850,13 +850,17 @@
int extra;
dest->s = NULL;
- /* this is here to cope with SMB2 calls using the SMB
- parsers. SMB2 will pass smbcli_session==NULL, which forces
- unicode on (as used by SMB2) */
- if (session == NULL && !(flags & STR_ASCII)) {
- flags |= STR_UNICODE;
+ if (!(flags & STR_ASCII)) {
+ /* this is here to cope with SMB2 calls using the SMB
+ parsers. SMB2 will pass smbcli_session==NULL, which forces
+ unicode on (as used by SMB2) */
+ if (session == NULL) {
+ flags |= STR_UNICODE;
+ } else if (session->transport->negotiate.capabilities & CAP_UNICODE) {
+ flags |= STR_UNICODE;
+ }
}
-
+
if (flags & STR_LEN8BIT) {
if (len_offset > blob->length-1) {
return 0;
@@ -870,9 +874,7 @@
}
extra = 0;
dest->s = NULL;
- if (!(flags & STR_ASCII) &&
- ((flags & STR_UNICODE) ||
- (session->transport->negotiate.capabilities & CAP_UNICODE))) {
+ if (!(flags & STR_ASCII) && (flags & STR_UNICODE)) {
int align = 0;
if ((str_offset&1) && !(flags & STR_NOALIGN)) {
align = 1;
More information about the samba-cvs
mailing list