Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/libgdf-0.1.3/libgdf/include/GDF/Channel.h Examining data/libgdf-0.1.3/libgdf/include/GDF/ChannelData.h Examining data/libgdf-0.1.3/libgdf/include/GDF/ChannelDataBase.h Examining data/libgdf-0.1.3/libgdf/include/GDF/EventConverter.h Examining data/libgdf-0.1.3/libgdf/include/GDF/EventDescriptor.h Examining data/libgdf-0.1.3/libgdf/include/GDF/EventHeader.h Examining data/libgdf-0.1.3/libgdf/include/GDF/Exceptions.h Examining data/libgdf-0.1.3/libgdf/include/GDF/GDFHeaderAccess.h Examining data/libgdf-0.1.3/libgdf/include/GDF/HeaderItem.h Examining data/libgdf-0.1.3/libgdf/include/GDF/MainHeader.h Examining data/libgdf-0.1.3/libgdf/include/GDF/Modifier.h Examining data/libgdf-0.1.3/libgdf/include/GDF/Reader.h Examining data/libgdf-0.1.3/libgdf/include/GDF/Record.h Examining data/libgdf-0.1.3/libgdf/include/GDF/RecordBuffer.h Examining data/libgdf-0.1.3/libgdf/include/GDF/RecordFullHandler.h Examining data/libgdf-0.1.3/libgdf/include/GDF/SignalHeader.h Examining data/libgdf-0.1.3/libgdf/include/GDF/TagHeader.h Examining data/libgdf-0.1.3/libgdf/include/GDF/Types.h Examining data/libgdf-0.1.3/libgdf/include/GDF/Version.h Examining data/libgdf-0.1.3/libgdf/include/GDF/Writer.h Examining data/libgdf-0.1.3/libgdf/include/GDF/pointerpool.h Examining data/libgdf-0.1.3/libgdf/include/GDF/tools.h Examining data/libgdf-0.1.3/libgdf/src/Channel.cpp Examining data/libgdf-0.1.3/libgdf/src/EventConverter.cpp Examining data/libgdf-0.1.3/libgdf/src/EventDescriptor.cpp Examining data/libgdf-0.1.3/libgdf/src/EventHeader.cpp Examining data/libgdf-0.1.3/libgdf/src/GDFHeaderAccess.cpp Examining data/libgdf-0.1.3/libgdf/src/MainHeader.cpp Examining data/libgdf-0.1.3/libgdf/src/Modifier.cpp Examining data/libgdf-0.1.3/libgdf/src/Reader.cpp Examining data/libgdf-0.1.3/libgdf/src/Record.cpp Examining data/libgdf-0.1.3/libgdf/src/RecordBuffer.cpp Examining data/libgdf-0.1.3/libgdf/src/SignalHeader.cpp Examining data/libgdf-0.1.3/libgdf/src/TagHeader.cpp Examining data/libgdf-0.1.3/libgdf/src/Types.cpp Examining data/libgdf-0.1.3/libgdf/src/Writer.cpp Examining data/libgdf-0.1.3/matlab/gdf_headerstruct.h Examining data/libgdf-0.1.3/matlab/gdf_mex.h Examining data/libgdf-0.1.3/matlab/gdf_reader.cpp Examining data/libgdf-0.1.3/matlab/gdf_writer.cpp Examining data/libgdf-0.1.3/matlab/matlab_tools/Commands.h Examining data/libgdf-0.1.3/matlab/matlab_tools/InstanceManager.h Examining data/libgdf-0.1.3/matlab/matlab_tools/String.h Examining data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h Examining data/libgdf-0.1.3/test/gdftest/main.cpp Examining data/libgdf-0.1.3/test/testCreateGDF.cpp Examining data/libgdf-0.1.3/test/testDataTypes.cpp Examining data/libgdf-0.1.3/test/testFail.cpp Examining data/libgdf-0.1.3/test/testHeader3.cpp Examining data/libgdf-0.1.3/test/testOK.cpp Examining data/libgdf-0.1.3/test/testRWConsistency.cpp Examining data/libgdf-0.1.3/test/testSparseSampling.cpp Examining data/libgdf-0.1.3/tools/gdf_merger/gdfmerger.cpp Examining data/libgdf-0.1.3/tools/gdf_merger/gdfmerger.h Examining data/libgdf-0.1.3/tools/gdf_merger/main.cpp FINAL RESULTS: data/libgdf-0.1.3/matlab/gdf_mex.h:59:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( dest, str1 ); data/libgdf-0.1.3/matlab/gdf_mex.h:61:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( dest, str2 ); data/libgdf-0.1.3/matlab/gdf_mex.h:63:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( dest, str3 ); data/libgdf-0.1.3/matlab/gdf_mex.h:65:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( dest, str4 ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:81:64: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setField( mxArray *struc, mxArray *value, std::string access, size_t index = 1 ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:82:58: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. mxArray *getField( const mxArray *struc, std::string access, size_t index = 1 ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:87:71: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setFieldString( mxArray *struc, std::string str, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:89:55: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( struc, mxCreateString(str.c_str()), access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:93:86: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setFieldString( mxArray *struc, const char *str, size_t length, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:98:47: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( struc, mxCreateString(tmp), access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:102:68: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setFieldNumeric( mxArray *struc, float value, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:106:31: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( struc, tmp, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:109:69: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setFieldNumeric( mxArray *struc, double value, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:113:31: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( struc, tmp, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:116:70: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setFieldNumeric( mxArray *struc, uint8_t value, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:120:31: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( struc, tmp, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:123:71: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setFieldNumeric( mxArray *struc, uint16_t value, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:127:31: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( struc, tmp, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:130:71: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setFieldNumeric( mxArray *struc, uint32_t value, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:134:31: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( struc, tmp, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:137:70: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setFieldNumeric( mxArray *struc, int64_t value, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:141:31: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( struc, tmp, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:144:71: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setFieldNumeric( mxArray *struc, uint64_t value, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:148:31: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( struc, tmp, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:171:67: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. std::string getFieldString( const mxArray *struc, std::string access, size_t index = 1, StringConversion conv = TONORMAL ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:173:43: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. mxArray *field = getField( struc, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:196:84: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void getFieldString( char *dst, size_t maxN, const mxArray *struc, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:198:43: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. mxArray *field = getField( struc, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:213:58: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. T getFieldNumeric( const mxArray *struc, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:221:43: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. mxArray *field = getField( struc, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:265:89: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void getFieldNumericArray( T *dst, size_t num_el, const mxArray *struc, std::string access, size_t index = 1 ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:273:43: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. mxArray *field = getField( struc, access, index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:468:64: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void mx::setField( mxArray *struc, mxArray *value, std::string access, size_t index ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:484:20: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. size_t punkt = access.find( '.' ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:487:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. fieldname = access; data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:492:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. fieldname = access.substr( 0, punkt ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:533:33: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( field, value, access.substr( punkt+1, access.length( ) ), field_index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:533:57: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. setField( field, value, access.substr( punkt+1, access.length( ) ), field_index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:549:58: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. mxArray *mx::getField( const mxArray *struc, std::string access, size_t index ) data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:565:20: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. size_t punkt = access.find( '.' ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:568:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. fieldname = access; data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:573:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. fieldname = access.substr( 0, punkt ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:609:33: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return getField( field, access.substr( punkt+1, access.length( ) ), field_index ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:609:57: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return getField( field, access.substr( punkt+1, access.length( ) ), field_index ); data/libgdf-0.1.3/libgdf/include/GDF/Modifier.h:45:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open( const std::string filename ); data/libgdf-0.1.3/libgdf/include/GDF/Reader.h:48:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open( const std::string filename ); data/libgdf-0.1.3/libgdf/include/GDF/Writer.h:64:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open( const int flags = writer_ev_file ); data/libgdf-0.1.3/libgdf/include/GDF/Writer.h:73:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open( const std::string filename, const int flags = writer_ev_file ); data/libgdf-0.1.3/libgdf/src/MainHeader.cpp:75:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( patient_id.item, other.patient_id.item, patient_id.len ); data/libgdf-0.1.3/libgdf/src/MainHeader.cpp:81:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( recording_id.item, other.recording_id.item, recording_id.len ); data/libgdf-0.1.3/libgdf/src/MainHeader.cpp:89:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( patient_ICD.item, other.patient_ICD.item, patient_ICD.len ); data/libgdf-0.1.3/libgdf/src/Modifier.cpp:44:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void Modifier::open( std::string filename ) data/libgdf-0.1.3/libgdf/src/Modifier.cpp:46:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). Reader::open( filename ); data/libgdf-0.1.3/libgdf/src/Reader.cpp:48:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void Reader::open( std::string filename ) data/libgdf-0.1.3/libgdf/src/Reader.cpp:51:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m_file.open( filename.c_str(), std::ios_base::in | std::ios::binary ); data/libgdf-0.1.3/libgdf/src/SignalHeader.cpp:97:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( transducer_type.item, other.transducer_type.item, transducer_type.len ); data/libgdf-0.1.3/libgdf/src/Writer.cpp:47:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void Writer::open(const int flags ) data/libgdf-0.1.3/libgdf/src/Writer.cpp:70:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m_file.open( m_filename.c_str(), std::ios_base::in ); data/libgdf-0.1.3/libgdf/src/Writer.cpp:81:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m_file.open( m_filename.c_str(), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc ); data/libgdf-0.1.3/libgdf/src/Writer.cpp:96:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m_evbuf_file.open( (m_filename+".events").c_str(), std::ios_base::out | std::ios_base::binary | std::ios_base::trunc ); data/libgdf-0.1.3/libgdf/src/Writer.cpp:113:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void Writer::open( const std::string filename, const int flags ) data/libgdf-0.1.3/libgdf/src/Writer.cpp:116:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open( flags ); data/libgdf-0.1.3/libgdf/src/Writer.cpp:137:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m_evbuf_file.open( (m_filename+".events").c_str(), std::ios_base::in | std::ios_base::binary ); data/libgdf-0.1.3/matlab/gdf_mex.h:264:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[128]; data/libgdf-0.1.3/matlab/gdf_reader.cpp:212:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). reader.open( filename ); data/libgdf-0.1.3/matlab/gdf_writer.cpp:305:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w->open( filename ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:96:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( tmp, str, length ); data/libgdf-0.1.3/matlab/matlab_tools/mxStructAccess.h:208:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( dst, ch, maxN ); data/libgdf-0.1.3/test/gdftest/main.cpp:52:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r.open( "/media/bci-public/clauzel/Clemens/bo8_2dCenterOut_01.gdf"); data/libgdf-0.1.3/test/gdftest/main.cpp:63:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m.open( "test.gdf" ); data/libgdf-0.1.3/test/gdftest/main.cpp:84:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r.open( "test.gdf" ); data/libgdf-0.1.3/test/gdftest/main.cpp:155:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w.open( "test.gdf", gdf::writer_ev_memory | gdf::writer_overwrite ); data/libgdf-0.1.3/test/gdftest/main.cpp:238:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w.open( "test_events.gdf", gdf::writer_ev_memory | gdf::writer_overwrite ); data/libgdf-0.1.3/test/gdftest/main.cpp:322:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w.open( "test.gdf", gdf::writer_ev_memory | gdf::writer_overwrite ); data/libgdf-0.1.3/test/testCreateGDF.cpp:63:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w.open( testfile ); data/libgdf-0.1.3/test/testDataTypes.cpp:44:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r.open( reffile ); data/libgdf-0.1.3/test/testHeader3.cpp:104:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r.open( reffile ); data/libgdf-0.1.3/test/testHeader3.cpp:172:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w.open( testfile, gdf::writer_ev_memory | gdf::writer_overwrite ); data/libgdf-0.1.3/test/testHeader3.cpp:208:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w.open( testfile, gdf::writer_ev_memory | gdf::writer_overwrite ); data/libgdf-0.1.3/test/testRWConsistency.cpp:112:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r.open( reffile ); data/libgdf-0.1.3/test/testRWConsistency.cpp:130:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w.open( testfile, gdf::writer_ev_memory | gdf::writer_overwrite ); data/libgdf-0.1.3/test/testSparseSampling.cpp:107:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). r.open( reffile ); data/libgdf-0.1.3/test/testSparseSampling.cpp:125:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). w.open( testfile, gdf::writer_ev_memory | gdf::writer_overwrite ); data/libgdf-0.1.3/tools/gdf_merger/gdfmerger.cpp:54:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). reader_.open(input_files_[0]); data/libgdf-0.1.3/tools/gdf_merger/gdfmerger.cpp:74:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). writer_.open( output_file_, gdf::writer_ev_memory | gdf::writer_overwrite ); data/libgdf-0.1.3/tools/gdf_merger/gdfmerger.cpp:83:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). reader_.open(input_files_[n]); data/libgdf-0.1.3/libgdf/include/GDF/Types.h:92:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). in.read( reinterpret_cast<char*>(&item), sizeof(item) ); data/libgdf-0.1.3/libgdf/include/GDF/Types.h:96:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). in.read( p--, 1 ); data/libgdf-0.1.3/libgdf/src/EventHeader.cpp:104:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). stream.read( reinterpret_cast<char*>(&mode), sizeof(mode) ); data/libgdf-0.1.3/libgdf/src/EventHeader.cpp:108:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). stream.read( reinterpret_cast<char*>(tmp), 3 ); data/libgdf-0.1.3/libgdf/src/TagHeader.cpp:217:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). stream.read( reinterpret_cast<char*>(&m_tag), 1 ); data/libgdf-0.1.3/libgdf/src/TagHeader.cpp:224:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). stream.read( reinterpret_cast<char*>(tmp), 3 ); data/libgdf-0.1.3/libgdf/src/TagHeader.cpp:234:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). stream.read( reinterpret_cast<char*>(&m_value[i+4]), 1 ); data/libgdf-0.1.3/libgdf/src/Writer.cpp:456:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_eventbuffer.read( reinterpret_cast<char*>(&ev), sizeof(ev) ); data/libgdf-0.1.3/libgdf/src/Writer.cpp:463:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_eventbuffer.read( reinterpret_cast<char*>(&ev), sizeof(ev) ); ANALYSIS SUMMARY: Hits = 95 Lines analyzed = 10934 in approximately 0.54 seconds (20257 lines/second) Physical Source Lines of Code (SLOC) = 7098 Hits@level = [0] 0 [1] 9 [2] 42 [3] 0 [4] 44 [5] 0 Hits@level+ = [0+] 95 [1+] 95 [2+] 86 [3+] 44 [4+] 44 [5+] 0 Hits/KSLOC@level+ = [0+] 13.3841 [1+] 13.3841 [2+] 12.1161 [3+] 6.19893 [4+] 6.19893 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.