git.samba.org
/
ambi
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67b978b
)
s3-vfs: Do not deref a NULL pointer in shadow_copy2_snapshot_to_gmt()
author
Andreas Schneider
<asn@samba.org>
Thu, 16 Feb 2017 16:15:38 +0000
(17:15 +0100)
committer
Jeremy Allison
<jra@samba.org>
Thu, 23 Feb 2017 02:18:10 +0000
(
03:18
+0100)
Found by covscan.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12592
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_shadow_copy2.c
patch
|
blob
|
history
diff --git
a/source3/modules/vfs_shadow_copy2.c
b/source3/modules/vfs_shadow_copy2.c
index 402eb70936b3c54a95f86023085bcb46c33e02a1..2afc5954e7d26f5a4cc8b681c378e8f87d89e263 100644
(file)
--- a/
source3/modules/vfs_shadow_copy2.c
+++ b/
source3/modules/vfs_shadow_copy2.c
@@
-1873,6
+1873,9
@@
static bool shadow_copy2_snapshot_to_gmt(vfs_handle_struct *handle,
}
/* Extract the prefix */
tmp = strstr(tmpstr, priv->config->delimiter);
+ if (tmp == NULL) {
+ goto done;
+ }
*tmp = '\0';
/* Parse regex */