git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3737ef
)
libcli: Add an overflow check
author
Volker Lendecke
<vl@samba.org>
Wed, 18 Jan 2017 15:43:56 +0000
(16:43 +0100)
committer
Jeremy Allison
<jra@samba.org>
Mon, 23 Jan 2017 21:46:13 +0000
(22:46 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/security/util_sid.c
patch
|
blob
|
history
diff --git
a/libcli/security/util_sid.c
b/libcli/security/util_sid.c
index 2ab47f2db2c1477366a791ec8d73686eac3d2bb7..ac4487657770d9c6ea346c1fbe18674526bd792f 100644
(file)
--- a/
libcli/security/util_sid.c
+++ b/
libcli/security/util_sid.c
@@
-339,6
+339,10
@@
NTSTATUS add_sid_to_array(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
{
struct dom_sid *tmp;
+ if ((*num) == UINT32_MAX) {
+ return NT_STATUS_INTEGER_OVERFLOW;
+ }
+
tmp = talloc_realloc(mem_ctx, *sids, struct dom_sid, (*num)+1);
if (tmp == NULL) {
*num = 0;