The Conversion used here is unsafe

RESOLVED INVALID

Status

()

Core
Layout: Text
RESOLVED INVALID
15 years ago
15 years ago

People

(Reporter: Marcus Tillmanns, Unassigned)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

15 years ago
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
(Reporter)

Updated

15 years ago
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
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.