diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argv/ntapi_tt_argv_envp.c | 2 | ||||
-rw-r--r-- | src/internal/ntapi_impl.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/argv/ntapi_tt_argv_envp.c b/src/argv/ntapi_tt_argv_envp.c index f8fe8b9..6be29c0 100644 --- a/src/argv/ntapi_tt_argv_envp.c +++ b/src/argv/ntapi_tt_argv_envp.c @@ -139,7 +139,7 @@ int32_t __stdcall __ntapi_tt_parse_cmd_line_args_utf16( else if (__NT_IS_MISALIGNED_LENGTH(argv_buffer_len)) return NT_STATUS_INVALID_PARAMETER_6; - else if (__NT_IS_MISALIGNED_BUFFER(arg_count)) + else if (__NT_IS_MISALIGNED_INT_BUFFER(arg_count)) return NT_STATUS_INVALID_PARAMETER_7; /* zero-out the aligned buffers */ diff --git a/src/internal/ntapi_impl.h b/src/internal/ntapi_impl.h index cde1dc7..beb72a6 100644 --- a/src/internal/ntapi_impl.h +++ b/src/internal/ntapi_impl.h @@ -24,6 +24,7 @@ /* helper macros */ #define __NT_ROUND_UP_TO_POWER_OF_2(x,y)(x + (y-1)) & ~(y-1) #define __NT_IS_MISALIGNED_BUFFER(x) ((!(uintptr_t)x) || ((uintptr_t)x % sizeof(size_t))) +#define __NT_IS_MISALIGNED_INT_BUFFER(x)((!(uintptr_t)x) || ((uintptr_t)x % sizeof(int))) #define __NT_IS_MISALIGNED_LENGTH(x) (x % sizeof(size_t)) #define __NT_FILE_SYNC_IO (NT_FILE_SYNCHRONOUS_IO_ALERT|NT_FILE_SYNCHRONOUS_IO_NONALERT) |