[ROOT-8116] TText::Copy utterly broken in all cases Created: 13/Apr/16  Updated: 14/Apr/16  Resolved: 14/Apr/16

Status: Closed
Project: ROOT
Component/s: None
Affects Version/s: 5.34/36, 6.06/02
Fix Version/s: 6.08/00, 5.34/38

Type: Bug Priority: High
Reporter: Oliver Freyermuth Assignee: Olivier Couet
Resolution: Fixed Votes: 0
Labels: None

Gentoo Linux x86_64

Attachments: File textcopy.tar.gz    
Actual End:


Dear ROOTers,

TText::Copy (and subsequently, the copy constructor, and all copy constructors of inheriting classes, such as TLatex) are utterly broken.
First off, the order of copying is done wrong for the wide-character name is missing,
and secondly, nullptr checks are missing.

For that reason, TText::Copy fails for both the case of a text with wchar and with normal char.

I attach an example, with makefile, illustrating the issue for both cases.

I also have a patch which survives the testcase which I sent as PR - I'll add the PR-number + link in a comment soon.

It would be nice if this bugfix could be applied to the ROOT 5 base, too.


Comment by Oliver Freyermuth [ 13/Apr/16 ]

The corresponding PR is #160 :


Comment by Olivier Couet [ 14/Apr/16 ]

Fixed Thanks.

Generated at Mon Feb 24 16:56:08 CET 2020 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.