Skip to content

Defeat buffer overflow #8

Merged
merged 3 commits into from
Oct 10, 2017
Merged

Defeat buffer overflow #8

merged 3 commits into from
Oct 10, 2017

Commits on Oct 9, 2017

  1. main.cpp: Defeat impact of possible buffer overflow

    'valgrind --tool=exp-sgcheck' detected an invalid write
    at former line 491 (sprintf...).
    
    Using snprintf avoids this condition, and allows data loss
    detection (Q: why not use the safer c++ strings, A:???).
    
    This fix has some observable impact on bsmap's output,
    although I've only seen a change in the amount of whitespace.
    
    I also assume that this might be the cause for the crashes
    at the end of bsmap execution.
    thomas committed Oct 9, 2017
    Configuration menu
    Copy the full SHA
    1dcfe72 View commit details
    Browse the repository at this point in the history
  2. main.cpp: Remove some whitespace clutter

    so that the next commit will look cute :)
    thomas committed Oct 9, 2017
    Configuration menu
    Copy the full SHA
    3a1d8ff View commit details
    Browse the repository at this point in the history
  3. main.cpp: Add snprintf code in similar code section

    Introduce snprintf & LINEBUFFSIZE in similar section for
    'single-read alignments'. This should make the code a bit
    cleaner.
    thomas committed Oct 9, 2017
    Configuration menu
    Copy the full SHA
    2f18c2c View commit details
    Browse the repository at this point in the history