Skip to content
Snippets Groups Projects
  1. Dec 11, 2018
  2. Dec 10, 2018
  3. Dec 09, 2018
  4. Dec 08, 2018
  5. Dec 07, 2018
  6. Dec 06, 2018
    • Danilo Piparo's avatar
      [Tutorials] Modernise FITSIO tutorials · e05abe9a
      Danilo Piparo authored
      e05abe9a
    • Danilo Piparo's avatar
      980b944b
    • Philippe Canal's avatar
      Address strncat gcc8 warning in TSystem.cxx · 098dea71
      Philippe Canal authored
      The warning:
      
      core/base/src/TSystem.cxx:1149:14: warning: ‘char* strncat(char*, const char*, size_t)’ accessing 1 byte at offsets 0 and [-2147483647, 2147483648] may overlap 1 byte at offset [0, 2147483649] [-Wrestrict]
             strncat(buff, c+1, n);
             ~~~~~~~^~~~~~~~~~~~~~
      
      is wrong because gcc8 does not (can not) detect that the input is already trimmed to kBufSize [strlcat(inp, c, kBufSize);]
      and that the buffer is also used in a segmented way (4 portion of kBufSize each).
      
      Switch from strncat to strlcat to suppress the warning.
      Add an assert expressing the known precondition.
      098dea71
    • Philippe Canal's avatar
      Revert "Fix potential string overlap in call to strncat() in TSystem" · 323d9a68
      Philippe Canal authored
      This reverts commit 912ee789.
      
      The apparent overlap mentioned in:
      
        Before reaching the changed line, c is set to be an index into buff,
        so the strings can overlap if no copy is performed, and that leads
        to unpredictable behaviour.
      
      can not happen by construction as the buffer is 'segmented' in 4
      independent parts.
      323d9a68
Loading