Opened 13 years ago

Closed 13 years ago

Last modified 6 years ago

#9376 closed patch

SCI: kString(Dup) : Invalid pointer

Reported by: SF/lephilousophe Owned by: bluegr
Priority: normal Component: Engine: SCI
Version: Keywords:
Cc: Game: Torin's Passage

Description

The source string pointer becomes invalid when a new string entry is allocated in the string table : the call to push_back moves the data to a new place and the old one gets erased. This makes the rawString pointer invalid and copied data is bad. The bug can be seen in Torin's passage (CD/Windows/French) : the save data file has a name with garbage in it. Attached is a fix proposal.

Ticket imported from: #3357096. Ticket imported from: patches/1481.

Attachments (1)

invalid-pointer.patch (1.2 KB ) - added by SF/lephilousophe 13 years ago.
Proposed fix

Download all attachments as: .zip

Change History (5)

by SF/lephilousophe, 13 years ago

Attachment: invalid-pointer.patch added

Proposed fix

comment:1 by bluegr, 13 years ago

Moving to patches

comment:2 by bluegr, 13 years ago

Applied in commit 8e75d9c. Thanks for your patch!

comment:3 by bluegr, 13 years ago

Owner: set to bluegr
Status: newclosed

comment:4 by digitall, 6 years ago

Component: Engine: SCI
Game: Torin's Passage
Note: See TracTickets for help on using tickets.