summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-08-13 08:31:22 +0000
committermidipix <writeonce@midipix.org>2019-08-13 08:55:28 +0000
commite2e6749a0bd44b768031822a2f2a256ed0e724ae (patch)
tree18eaac401b99cf1e1d6a61f73273548e122f1ffe /src
parentabdbe10374e1b18f6e90d4068c29e8db256facb7 (diff)
downloadntapi-e2e6749a0bd44b768031822a2f2a256ed0e724ae.tar.bz2
ntapi-e2e6749a0bd44b768031822a2f2a256ed0e724ae.tar.xz
__ntapi_uc_validate_unicode_stream_{utf8|utf16}(): explicitly set .bytes_count;
Diffstat (limited to 'src')
-rw-r--r--src/unicode/ntapi_uc_unicode_validation.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/unicode/ntapi_uc_unicode_validation.c b/src/unicode/ntapi_uc_unicode_validation.c
index 7596c98..4b43436 100644
--- a/src/unicode/ntapi_uc_unicode_validation.c
+++ b/src/unicode/ntapi_uc_unicode_validation.c
@@ -226,8 +226,10 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf8(
ch = callback_args->src;
}
- if ((ch < ch_boundary) && (*ch == 0))
+ if ((ch < ch_boundary) && (*ch == 0)) {
+ callback_args->byte_count = 1;
return callback_fn[0](callback_args);
+ }
return NT_STATUS_SUCCESS;
}
@@ -329,8 +331,10 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf16(
wch = callback_args->src;
}
- if ((wch < wch_boundary) && (*wch == 0))
+ if ((wch < wch_boundary) && (*wch == 0)) {
+ callback_args->byte_count = 1;
return callback_fn[0](callback_args);
+ }
return NT_STATUS_SUCCESS;
}