Opened 8 years ago

Closed 8 years ago

Last modified 9 months ago

#9376 closed patch

SCI: kString(Dup) : Invalid pointer

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


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 8 years ago.
Proposed fix

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by SF/lephilousophe

Attachment: invalid-pointer.patch added

Proposed fix

comment:1 Changed 8 years ago by bluegr

Moving to patches

comment:2 Changed 8 years ago by bluegr

Applied in commit 8e75d9c. Thanks for your patch!

comment:3 Changed 8 years ago by bluegr

Owner: set to bluegr
Status: newclosed

comment:4 Changed 9 months ago by digitall

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