s3-libsmbclient: Fix crash bug in SMBC_parse_path().
authorGünther Deschner <gd@samba.org>
Thu, 14 Jan 2010 19:34:04 +0000 (11:34 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 24 Feb 2010 15:25:09 +0000 (16:25 +0100)
Patch from Tim Waugh <twaugh@redhat.com>.
This resolves https://bugzilla.redhat.com/show_bug.cgi?id=552658

LIBSMBCLIENT-OPENDIR torture test checks this as well.

Guenther

Fix bug #7043 (SIGSEGV in "SMBC_parse_path").
(cherry picked from commit 07263901632bb98851d86dc0ba1d2dc22735c020)

source/libsmb/libsmb_path.c

index 3ea03446d8931d38d79659097bb6c7429293394e..0a54db49af58750c5be0b66632761a0f037143d4 100644 (file)
@@ -308,7 +308,7 @@ SMBC_parse_path(TALLOC_CTX *ctx,
                if (!*pp_server) {
                        return -1;
                }
-                       *pp_server[wl] = '\0';
+               (*pp_server)[wl] = '\0';
                return 0;
        }