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

Error check in TKey.cxx

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Medium
    • 6.00.00
    • 5.34/00, 6.00.00
    • I/O
    • None
    • Error handling when reading ROOT files

    • Suggestion
    • 3 - Normal

    Description

      In TKey.cxx. line 776

      http://root.cern.ch/root/html/src/TKey.cxx.html#776

      One could potentially make arithmetic with NULL pointer, which is not good.
      I propose to check pobj before performing arithmetic.

      if (!pobj)

      { Error("ReadObj", "Cannot create new object of class %s", fClassName.Data()); return 0; }

      TObject* tobj = (TObject*)(pobj+baseOffset);

      Attachments

        Activity

          People

            pcanal Philippe Canal
            slinev Serguei Linev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - Not Specified
                Not Specified