Menu

#208 Files only containing comments cannot be read

v1.1.x
fixed
None
v1.1.0
Bug Fix
2017-08-20
2017-06-10
Erik Hänel
No

Files, which only contains comment lines, cannot be read by read, because it's throwing a substr error.

Analysis:
One line in the corresponding function performs string::pop_back() without checking the length of a file.

Implementation:
Fix was implemented as proposed by the analysis.

Documentation:
Not needed - Bug fix.

Tests:
No deviations detected. Fix implemented successfully.

Discussion

  • Erik Hänel

    Erik Hänel - 2017-06-10
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2017-06-10
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,9 @@
     Files, which only contains comment lines, cannot be read by `read`, because it's throwing a substr error.
    +
    +**Analysis:**
    +
    +**Implementation:**
    +
    +**Documentation:**
    +
    +**Tests:**
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2017-06-10
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,7 @@
     Files, which only contains comment lines, cannot be read by `read`, because it's throwing a substr error.
    
     **Analysis:**
    +One line in the corresponding function performs `string::pop_back()` without checking the length of a file.
    
     **Implementation:**
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2017-06-10
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,7 +4,9 @@
     One line in the corresponding function performs `string::pop_back()` without checking the length of a file.
    
     **Implementation:**
    +Fix was implemented as proposed by the analysis.
    
     **Documentation:**
    +Not needed - Bug fix.
    
     **Tests:**
    
    • status: implementing --> testing
     
  • Erik Hänel

    Erik Hänel - 2017-08-20
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,3 +10,4 @@
     Not needed - Bug fix.
    
     **Tests:**
    +No deviations detected. Fix implemented successfully.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB