summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/unicode/ntapi_uc_unicode_conversion_from_utf16.c8
-rw-r--r--src/unicode/ntapi_uc_unicode_conversion_from_utf8.c8
-rw-r--r--src/unicode/ntapi_uc_unicode_validation.c4
3 files changed, 18 insertions, 2 deletions
diff --git a/src/unicode/ntapi_uc_unicode_conversion_from_utf16.c b/src/unicode/ntapi_uc_unicode_conversion_from_utf16.c
index eb8196c..f089ec0 100644
--- a/src/unicode/ntapi_uc_unicode_conversion_from_utf16.c
+++ b/src/unicode/ntapi_uc_unicode_conversion_from_utf16.c
@@ -272,7 +272,15 @@ int32_t __stdcall __ntapi_uc_convert_unicode_stream_utf16_to_utf8(
switch (status) {
case NT_STATUS_SUCCESS:
+ params->addr_failed = 0;
+ params->leftover_bytes = 0;
+ params->leftover_count = 0;
+ return status;
+
case NT_STATUS_BUFFER_TOO_SMALL:
+ params->addr_failed = args.src;
+ params->leftover_bytes = 0;
+ params->leftover_count = 0;
return status;
default:
diff --git a/src/unicode/ntapi_uc_unicode_conversion_from_utf8.c b/src/unicode/ntapi_uc_unicode_conversion_from_utf8.c
index 48eacb2..9543b71 100644
--- a/src/unicode/ntapi_uc_unicode_conversion_from_utf8.c
+++ b/src/unicode/ntapi_uc_unicode_conversion_from_utf8.c
@@ -273,7 +273,15 @@ int32_t __stdcall __ntapi_uc_convert_unicode_stream_utf8_to_utf16(
switch (status) {
case NT_STATUS_SUCCESS:
+ params->addr_failed = 0;
+ params->leftover_bytes = 0;
+ params->leftover_count = 0;
+ return status;
+
case NT_STATUS_BUFFER_TOO_SMALL:
+ params->addr_failed = args.src;
+ params->leftover_bytes = 0;
+ params->leftover_count = 0;
return status;
default:
diff --git a/src/unicode/ntapi_uc_unicode_validation.c b/src/unicode/ntapi_uc_unicode_validation.c
index dbdf4e1..35b2d50 100644
--- a/src/unicode/ntapi_uc_unicode_validation.c
+++ b/src/unicode/ntapi_uc_unicode_validation.c
@@ -108,7 +108,7 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf8(
__in const unsigned char * ch,
__in size_t size_in_bytes __optional,
__out size_t * code_points __optional,
- __out void ** addr_failed __optional,
+ __out const unsigned char ** addr_failed __optional,
__in ntapi_uc_utf8_callback_fn ** callback_fn __optional,
__in nt_utf8_callback_args * callback_args __optional)
{
@@ -247,7 +247,7 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf16(
__in const wchar16_t * wch,
__in size_t size_in_bytes __optional,
__out size_t * code_points __optional,
- __out void ** addr_failed __optional,
+ __out const wchar16_t ** addr_failed __optional,
__in ntapi_uc_utf16_callback_fn ** callback_fn __optional,
__in nt_utf16_callback_args * callback_args __optional)
{