summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2013-05-08 18:58:32 +0200
committerAnatol Belski <ab@php.net>2013-05-08 19:22:37 +0200
commit4091e946606deaf2f8d909e20701bdb832996074 (patch)
tree00b5c6fa7dc7f837953f11692d3080b51f228561 /ext/mysql/php_mysql.c
parent288f04c430b271c416b4cc0a4cef7845927be7b0 (diff)
downloadphp-git-4091e946606deaf2f8d909e20701bdb832996074.tar.gz
Fixed bug #64769 mbstring PHPTs crash on Windows x64
The tricky business going there in oniguruma is saving a pointer in an int variable, passing that variable into a function and making it a pointer again. On 64bit windows casting a pointer to a 32 bit int will truncate that pointer. This kind of things won't work on Windows x64. [SNIPPET] unsigned long ul0[2], ul1, *ul2; ul0[0] = 42uL; ul0[0] = 24uL; ul1 = (unsigned long)ul0; ul2 = (unsigned long *)ul1; /* now it's broken, accessing ul2[0] will crash. */ [/SNIPPET] To make it portable, ULONG_PTR should be used in this case. In oniguruma this behaviour is to see at least in the following codepath: ext/mbstring/oniguruma/enc/unicode.c:10938 ext/mbstring/oniguruma/st.c:308 ext/mbstring/oniguruma/enc/unicode.c:10859
Diffstat (limited to 'ext/mysql/php_mysql.c')
0 files changed, 0 insertions, 0 deletions