summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-27 23:50:30 +0000
committerJeremy Allison <jra@samba.org>1998-05-27 23:50:30 +0000
commit459ecfec832c872f4186c06de4917f19e8f0ef98 (patch)
tree3bc7737c59fd37fa427f6f778340765004798dd2 /source3
parentad53f02511506e75f4f656b4164e12da4a7aafe7 (diff)
downloadsamba-459ecfec832c872f4186c06de4917f19e8f0ef98.tar.gz
samba-459ecfec832c872f4186c06de4917f19e8f0ef98.tar.bz2
samba-459ecfec832c872f4186c06de4917f19e8f0ef98.zip
Ooops - fixed Win95 crash bugs with earlier code.
Jeremy (This used to be commit 6baeb4ad96bc58cf1bd53f6621067af8344c9556)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/util.c10
2 files changed, 7 insertions, 4 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 44821405d4..3086c6cd24 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2013,7 +2013,6 @@ BOOL string_init(char **dest,char *src);
void string_free(char **s);
BOOL string_set(char **dest,char *src);
BOOL string_sub(char *s,char *pattern,char *insert);
-BOOL mask_match(char *str, char *regexp, int case_sig, BOOL trans2);
BOOL do_match(char *str, char *regexp, int case_sig);
BOOL mask_match(char *str, char *regexp, int case_sig,BOOL trans2);
void become_daemon(void);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index dc8619cdc6..b5e52374d9 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -3077,8 +3077,13 @@ BOOL mask_match(char *str, char *regexp, int case_sig,BOOL trans2)
pstrcpy(t_pattern,regexp);
pstrcpy(t_filename,str);
+#if 0
+ /*
+ * Not sure if this is a good idea. JRA.
+ */
if(trans2 && is_8_3(t_pattern,False) && is_8_3(t_filename,False))
trans2 = False;
+#endif
#if 0
if (!strchr(t_filename,'.')) {
@@ -3147,12 +3152,11 @@ BOOL mask_match(char *str, char *regexp, int case_sig,BOOL trans2)
if(fp)
*fp = '\0';
- if(do_match( cp2, cp1, case_sig)) {
- cp1 = rp ? rp + 1 : NULL;
+ if((cp1 != NULL) && do_match( cp2, cp1, case_sig)) {
cp2 = fp ? fp + 1 : "";
break;
}
- cp2 = fp + 1;
+ cp2 = fp ? fp + 1 : "";
}
num_path_components -= i;
}