git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5652810
)
idmap_autorid: Protect against corrupt databases
author
Volker Lendecke
<vl@samba.org>
Wed, 10 Feb 2016 08:02:12 +0000
(09:02 +0100)
committer
Jeremy Allison
<jra@samba.org>
Mon, 7 Mar 2016 21:16:20 +0000
(22:16 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/idmap_autorid.c
patch
|
blob
|
history
diff --git
a/source3/winbindd/idmap_autorid.c
b/source3/winbindd/idmap_autorid.c
index 3f6f20c78de61c7619e1a9c144a496f2258b4a15..20cd5b72a98a28ae6292dee4c437572edd8c6c70 100644
(file)
--- a/
source3/winbindd/idmap_autorid.c
+++ b/
source3/winbindd/idmap_autorid.c
@@
-217,6
+217,13
@@
static NTSTATUS idmap_autorid_id_to_sid(struct autorid_global_config *cfg,
return NT_STATUS_OK;
}
+ if (data.dptr[data.dsize-1] != '\0') {
+ DBG_WARNING("Invalid range %"PRIu32"\n", range_number);
+ TALLOC_FREE(data.dptr);
+ map->status = ID_UNKNOWN;
+ return NT_STATUS_OK;
+ }
+
if (strncmp((const char *)data.dptr,
ALLOC_RANGE,
strlen(ALLOC_RANGE)) == 0) {