[Nasm-bugs] [Bug 3392544] Global-buffer-overflow problem in function crc64ib in crc64.c

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Sun Oct 27 11:39:16 PDT 2019


https://bugzilla.nasm.us/show_bug.cgi?id=3392544

Alex Xu <xiangzhex at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xiangzhex at gmail.com

--- Comment #4 from Alex Xu <xiangzhex at gmail.com> ---
It seems that this problem is caused by the inline function "nasm_tolower"
defined in nctype.h. The return type of this function should be "unsigned char"
instead of "char". 

When the program uses "(uint8_t)crc ^ nasm_tolower(c)" to access crc64_tab, it
seems that the machine will first sign_extend the return value of
nasm_tolower(c)".

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list