The branch, v3-3-test has been updated
       via  5222b8db3fb692e5071bfd1b41849a8eb0a17995 (commit)
       via  eb6096a2d488d64cfa86e01be2a97e14e5773fe3 (commit)
       via  44a9e5b713c25ff2cc7215635a516f25359b045b (commit)
      from  9e2ab30d3cf6950fc79152b2169e7aeae8d6a366 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit 5222b8db3fb692e5071bfd1b41849a8eb0a17995
Author: Volker Lendecke <[EMAIL PROTECTED]>
Date:   Fri Jun 27 11:22:23 2008 +0200

    Fix two IBM checker warnings
    
    Steve, please check!
    
    Thanks,
    
    Volker

commit eb6096a2d488d64cfa86e01be2a97e14e5773fe3
Author: Volker Lendecke <[EMAIL PROTECTED]>
Date:   Fri Jun 27 11:19:26 2008 +0200

    Fix an "invalid operation involving NULL pointer" found by the IBM checker
    
    Jerry, please check!
    
    Volker

commit 44a9e5b713c25ff2cc7215635a516f25359b045b
Author: Volker Lendecke <[EMAIL PROTECTED]>
Date:   Fri Jun 27 11:13:07 2008 +0200

    Remove a strlen check that will never kick in
    
    strlen(str)<2 will be caught by the explicit tests for str[0] and str[1] in 
the
    lines above this.
    
    Jerry, please check!
    
    Volker

-----------------------------------------------------------------------

Summary of changes:
 source/client/mount.cifs.c            |    4 ++--
 source/nsswitch/libwbclient/wbc_sid.c |    9 ++++++---
 2 files changed, 8 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index c42375b..ea254b6 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -514,8 +514,8 @@ static int parse_options(char ** optionsp, int * 
filesys_flags)
                                printf("CIFS: UNC name too long\n");
                                return 1;
                        }
-               } else if ((strncmp(data, "domain", 3) == 0)
-                          || (strncmp(data, "workgroup", 5) == 0)) {
+               } else if ((strncmp(data, "domain", 6) == 0)
+                          || (strncmp(data, "workgroup", 9) == 0)) {
                        if (!value || !*value) {
                                printf("CIFS: invalid domain name\n");
                                return 1;       /* needs_arg; */
diff --git a/source/nsswitch/libwbclient/wbc_sid.c 
b/source/nsswitch/libwbclient/wbc_sid.c
index b090926..f3d5896 100644
--- a/source/nsswitch/libwbclient/wbc_sid.c
+++ b/source/nsswitch/libwbclient/wbc_sid.c
@@ -102,8 +102,7 @@ wbcErr wbcStringToSid(const char *str,
 
        if (!str
            || (str[0]!='S' && str[0]!='s')
-           || (str[1]!='-')
-           || (strlen(str)<2))
+           || (str[1]!='-'))
        {
                wbc_status = WBC_ERR_INVALID_PARAM;
                BAIL_ON_WBC_ERROR(wbc_status);
@@ -142,9 +141,13 @@ wbcErr wbcStringToSid(const char *str,
        while (sid->num_auths < WBC_MAXSUBAUTHS) {
                if ((x=(uint32_t)strtoul(p, &q, 10)) == 0)
                        break;
+               if (q == NULL) {
+                       wbc_status = WBC_ERR_INVALID_SID;
+                       BAIL_ON_WBC_ERROR(wbc_status);
+               }
                sid->sub_auths[sid->num_auths++] = x;
 
-               if (q && ((*q!='-') || (*q=='\0')))
+               if ((*q!='-') || (*q=='\0'))
                        break;
                p = q + 1;
        }


-- 
Samba Shared Repository

Reply via email to