Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8116

TText::Copy utterly broken in all cases

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.34/36, 6.06/02
    • Fix Version/s: 6.08/00, 5.34/38
    • Component/s: None
    • Labels:
      None
    • Environment:

      Gentoo Linux x86_64

      Description

      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.

      Cheers,
      Oliver

        Attachments

        1. textcopy.tar.gz
          0.4 kB
          Oliver Freyermuth

          Activity

            People

            • Assignee:
              couet Olivier Couet
              Reporter:
              ofreyerm Oliver Freyermuth
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: