diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util_reg_api.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c index 8668bd8817..a4fb0261e3 100644 --- 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); |