Menu

#338 Bug in gdcm::scanner::GetAllFilenamesFromTagToValue(Tag const &t, const char *valueref) const

2.4.4
closed
5
2014-09-11
2014-08-29
No

Hi,

there's an error in gdcm::scanner::GetAllFilenamesFromTagToValue(Tag const &t, const char *valueref) const.

Here's the context: I'm using GetAllFilenamesFromTagToValue to get all the files of a given series (using SeriesInstanceUID).

So say gdcm::scanner::GetAllFilenamesFromTagToValue is called with valueref="1.2.3.4.5.1", if there's a file with SeriesInstanceUID = "1.2.3.4.5.10", then the test line 305 will return true (because strncmp("1.2.3.4.5.1","1.2.3.4.5.10", 11) == 0) and the file with SeriesInstanceUID = "1.2.3.4.5.10" will be affected to list of file with seriesInstanceUID="1.2.3.4.5.1"

a test verifying that length(valueref) == length(value) is missing..

This bug exists in version 2.0.18, 2.4.2 and 2.4.3 at least

V

Discussion

  • Mathieu Malaterre

    • status: open --> closed
    • assigned_to: Mathieu Malaterre
     
  • Mathieu Malaterre

    [release d1ff97a] Fix an issue in gdcm::Scanner class
    4 files changed, 75 insertions(+), 8 deletions(-)
    rename Testing/Source/MediaStorageAndFileFormat/Cxx/{TestScanner.cxx => TestScanner1.cxx} (99%)
    create mode 100644 Testing/Source/MediaStorageAndFileFormat/Cxx/TestScanner2.cxx

     

Log in to post a comment.

MongoDB Logo MongoDB