Skip to content
  • Lorenz Huedepohl's avatar
    Refactor unsafe string conversion with C pointers · 0d444556
    Lorenz Huedepohl authored
    Recent GCC complain that an assignment involving a transfer statement
    might potentially overflow the destination buffer. This prevented a
    build on the SuSE build server.
    
    Replaced this with a proper C string pointer.
    
    Error message there:
    
     ../src/elpa_driver/legacy_interface/./elpa_driver_c_interface_template.X90:117:0:
    
            methodFortran(1:charCount) = transfer(method(1:charCount), methodFortran)
    
     Warning: '__builtin_memset': writing between 1 and 2147483640 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
    
     [...]
    
     I: Statement might potentially overflow a destination buffer, where a size larger
         than the actual buffer was specified
     E: elpa destbufferoverflow Warning: '__builtin_memset'
    0d444556