Closed Bug 173116 Opened 23 years ago Closed 14 years ago

CRASH: BeZilla sometimes crashes on count_font_styles

Categories

(Core Graveyard :: GFX, defect)

x86
BeOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: sergei_d, Assigned: sergei_d)

Details

(Keywords: crash)

Attachments

(1 file)

BeZilla sometimes crashes on count_font_styles with segment violation error. in gfx/src/beos/nsFontMetricsBeOS.cpp, NS_IMETHODIMP nsFontMetricsBeOS::Init(*) { ---- char *real_family = NULL; ---------------------- prefs->CopyCharPref( prop, &real_family ); if ((real_family) && count_font_styles((font_family)real_family) > 0) -------------- real_family don't allocate any real memory, which seems suspicious inspite null-check;
Seems CopyCharPref is strduping existing, so bug origin is somewhere else
Copied safer approach from GTK code and added length-check.
Adding Paul
Comment on attachment 102041 [details] [diff] [review] Patch. Copied safer approach from GTK code r=arougthopher sr=blizzard
Attachment #102041 - Flags: superreview+
Attachment #102041 - Flags: review+
checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Severity: normal → critical
Keywords: crash
Another call for count_font_styles in Init() also needs safer implementation.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Product: Core → Core Graveyard
BeOS is no longer supported.
Status: REOPENED → RESOLVED
Closed: 23 years ago14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: