From 3fe974c4feed33187294a0cb922c20f7dbfeaf43 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 16 Jan 2009 12:26:46 -0800 Subject: [PATCH] Fix a segfault if ? is there but the options are NULL. This is the case if SMBC_parse_path is called by SMBC_stat_ctx. --- source3/libsmb/libsmb_path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/libsmb/libsmb_path.c b/source3/libsmb/libsmb_path.c index 2c3a5f8866b..b0970d46db4 100644 --- a/source3/libsmb/libsmb_path.c +++ b/source3/libsmb/libsmb_path.c @@ -286,7 +286,7 @@ SMBC_parse_path(TALLOC_CTX *ctx, DEBUG(4, ("Found options '%s'", q)); /* Copy the options */ - if (*pp_options != NULL) { + if (pp_options && *pp_options != NULL) { TALLOC_FREE(*pp_options); *pp_options = talloc_strdup(ctx, q); } -- 2.11.4.GIT