Opened 10 years ago

Closed 10 years ago

#3673 closed bug (fixed)

[patch] Calling SetText on a BTextView crash when given a bad text_run_array

Reported by: oco Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

The problem was discovered on a badly written application that send an unitialized text_run_array struct.

This application run ok under BeOS, but not under Haiku (page fault).

After investigation, the BTextView was not stylable. According to the BeBook, in this case, the text_run_array should be ignored. It was not the case under Haiku.

So, i propose this patch made with hints from Korli. It also fixe SetRunArray which have the same problem.

http://www.haiku-os.org/legacy-docs/bebook/BTextView.html#BTextView_SetText http://www.haiku-os.org/legacy-docs/bebook/BTextView.html#BTextView_SetRunArray

Attachments (1)

TextView_r29384.diff (1.0 KB) - added by oco 10 years ago.

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by oco

Attachment: TextView_r29384.diff added

comment:1 Changed 10 years ago by anevilyak

Resolution: fixed
Status: newclosed

Applied in hrev29911.

Note: See TracTickets for help on using tickets.