summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/unicode/ntapi_uc_unicode_validation.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/unicode/ntapi_uc_unicode_validation.c b/src/unicode/ntapi_uc_unicode_validation.c
index b10f0f4..7241509 100644
--- a/src/unicode/ntapi_uc_unicode_validation.c
+++ b/src/unicode/ntapi_uc_unicode_validation.c
@@ -112,6 +112,7 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf8(
__in ntapi_uc_utf8_callback_fn ** callback_fn __optional,
__in nt_utf8_callback_args * callback_args __optional)
{
+ int32_t status;
const unsigned char * utf8;
unsigned char * ch_boundary;
unsigned char byte_count;
@@ -211,7 +212,9 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf8(
if (byte_count) {
(*code_points)++;
callback_args->byte_count = byte_count;
- callback_fn[byte_count](callback_args);
+
+ if ((status = callback_fn[byte_count](callback_args)))
+ return status;
} else {
if (addr_failed)
*addr_failed = (void *)utf8;
@@ -223,7 +226,7 @@ int32_t __stdcall __ntapi_uc_validate_unicode_stream_utf8(
}
if ((ch < ch_boundary) && (*ch == 0))
- callback_fn[0](callback_args);
+ return callback_fn[0](callback_args);
return NT_STATUS_SUCCESS;
}