diff options
author | midipix <writeonce@midipix.org> | 2016-06-20 12:05:10 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-06-20 12:05:10 -0400 |
commit | 099813ca335488ed3e67e96615df8c3e7c6ecad0 (patch) | |
tree | e0d306e0c533d8fc652baf78680610b362ad4d66 /src | |
parent | 262e3bc8fcc15d554db8ed39b588b09b91b0cd94 (diff) | |
download | ntapi-099813ca335488ed3e67e96615df8c3e7c6ecad0.tar.bz2 ntapi-099813ca335488ed3e67e96615df8c3e7c6ecad0.tar.xz |
__ntapi_uc_validate_unicode_stream_utf8(): preserve callback fn return value.
Diffstat (limited to 'src')
-rw-r--r-- | src/unicode/ntapi_uc_unicode_validation.c | 7 |
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; } |