git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d6b8ff
)
r23673: Check for integer wrap on incoming data.
author
Jeremy Allison
<jra@samba.org>
Mon, 2 Jul 2007 20:51:09 +0000
(20:51 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 17:23:45 +0000
(12:23 -0500)
Jeremy.
(This used to be commit
77a46c7aee2ad4c402527cf78e5ae70a792d65d4
)
source3/lib/util_reg_api.c
patch
|
blob
|
history
diff --git
a/source3/lib/util_reg_api.c
b/source3/lib/util_reg_api.c
index 8668bd881759669fd31805cb960e6b0400a59d62..a4fb0261e310940b714332044c1efea483e3b2a6 100644
(file)
--- a/
source3/lib/util_reg_api.c
+++ b/
source3/lib/util_reg_api.c
@@
-80,6
+80,12
@@
WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
tmp[num_ucs2] = 0;
}
+ if (length + 2 < length) {
+ /* Integer wrap. */
+ err = WERR_INVALID_PARAM;
+ goto error;
+ }
+
value->v.sz.len = convert_string_talloc(
value, CH_UTF16LE, CH_UNIX, tmp, length+2,
&value->v.sz.str, False);