Opened 15 years ago

Closed 15 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:
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 15 years ago.

Download all attachments as: .zip

Change History (2)

by oco, 15 years ago

Attachment: TextView_r29384.diff added

comment:1 by anevilyak, 15 years ago

Resolution: fixed
Status: newclosed

Applied in hrev29911.

Note: See TracTickets for help on using tickets.