Closed Bug 221790 Opened 22 years ago Closed 22 years ago

The Conversion used here is unsafe

Categories

(Core :: Layout: Text and Fonts, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: maddi, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1 Line 743 : FT_ULong code_point = aString[i]; Has to be : FT_ULong code_point = (UNSIGNED SHORT INT)aString[i]; because the conversion might be false if aString[i] is < 0 Reproducible: Always Steps to Reproduce: See details Actual Results: Wrong Character Mapping Expected Results: Correct Character Mapping :) Line 743 : FT_ULong code_point = aString[i]; Has to be : FT_ULong code_point = (UNSIGNED SHORT INT)aString[i]; because the conversion might be false if aString[i] is < 0
Component: GFX: Win32 → Layout: Fonts and Text
aString is a PRUnichar*. PRUnichar is defined as: typedef PRUint16 PRUnichar; on Unix platforms. The code you point to runs on Unix only (I'm not sure why you filed this in GFX:Win32). So the conversion looks fine to me.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.