Blob Blame History Raw
From 35d55bf0f02fe6496b23e7bf692213421cecad4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
Date: Thu, 14 Jan 2010 19:34:26 +0100
Subject: [PATCH] s3-libsmbclient: Fix crash bug in SMBC_parse_path().

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
(cherry picked from commit e635b0074c55e0376495abe940355aa7b04f0b70)
---
 source3/libsmb/libsmb_path.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/source3/libsmb/libsmb_path.c b/source3/libsmb/libsmb_path.c
index 6a59a12..511d54e 100644
--- a/source3/libsmb/libsmb_path.c
+++ b/source3/libsmb/libsmb_path.c
@@ -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;
 	}
         
-- 
1.6.5.2