summaryrefslogtreecommitdiff
path: root/gs/freetype/Jamrules
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2011-07-17 09:45:35 -0700
committerRay Johnston <ray.johnston@artifex.com>2011-07-17 09:45:35 -0700
commit5dd9cbfc679345d11643e2e878e1a63b8e4c16cd (patch)
tree1b921abccf39026ee7b2e5cea14254c321eff2bc /gs/freetype/Jamrules
parent2711662696407b82c2d382ae85567a5bd67f2037 (diff)
Fix crashes and assertion on 32-bit Windows builds. Bugs 692347, 692348.
Thanks to SaGS for these fixes. Assertion and crash were found during final checkout of the 9.03 release, as well as on the master branch. Partly these problems came from the UTF-8 changes. VS treats the "char" type as signed by default. When extended characters are promoted to ints, the values are negative in the range -128 to -1. These values (except -1 which conflicts with EOF) are not valid for the "is*()" family of functions. For GS_ registry entries that are not set, the utf8 version of 'gp_getenv_registry()' incorrectly returned an 'insufficient buffer space' verdict and let the 'needed buffer size' to 0 (cbData = 0 after 'RegQueryValueExW()'). The call to fetch the value was then made also with a 0-sized buffer, did the same thing, and left the buffer for the value undefined. There were also other problems, for example non-REG_SZ entries were ignored only when the value was actually requested (not during the request for the buffer size) and the function was doing 'free(wp)' with wp == NULL in a few cases.
Diffstat (limited to 'gs/freetype/Jamrules')
0 files changed, 0 insertions, 0 deletions