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/ros-roscpp-core-0.7.2/cpp_common/include/ros/cpp_common_decl.h Examining data/ros-roscpp-core-0.7.2/cpp_common/include/ros/datatypes.h Examining data/ros-roscpp-core-0.7.2/cpp_common/include/ros/debug.h Examining data/ros-roscpp-core-0.7.2/cpp_common/include/ros/exception.h Examining data/ros-roscpp-core-0.7.2/cpp_common/include/ros/header.h Examining data/ros-roscpp-core-0.7.2/cpp_common/include/ros/macros.h Examining data/ros-roscpp-core-0.7.2/cpp_common/include/ros/platform.h Examining data/ros-roscpp-core-0.7.2/cpp_common/include/ros/types.h Examining data/ros-roscpp-core-0.7.2/cpp_common/src/debug.cpp Examining data/ros-roscpp-core-0.7.2/cpp_common/src/header.cpp Examining data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/roscpp_serialization_macros.h Examining data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h Examining data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialized_message.h Examining data/ros-roscpp-core-0.7.2/roscpp_serialization/src/serialization.cpp Examining data/ros-roscpp-core-0.7.2/roscpp_traits/include/ros/builtin_message_traits.h Examining data/ros-roscpp-core-0.7.2/roscpp_traits/include/ros/message_event.h Examining data/ros-roscpp-core-0.7.2/roscpp_traits/include/ros/message_forward.h Examining data/ros-roscpp-core-0.7.2/roscpp_traits/include/ros/message_operations.h Examining data/ros-roscpp-core-0.7.2/roscpp_traits/include/ros/message_traits.h Examining data/ros-roscpp-core-0.7.2/roscpp_traits/include/ros/service_traits.h Examining data/ros-roscpp-core-0.7.2/rostime/include/ros/duration.h Examining data/ros-roscpp-core-0.7.2/rostime/include/ros/impl/duration.h Examining data/ros-roscpp-core-0.7.2/rostime/include/ros/impl/time.h Examining data/ros-roscpp-core-0.7.2/rostime/include/ros/rate.h Examining data/ros-roscpp-core-0.7.2/rostime/include/ros/rostime_decl.h Examining data/ros-roscpp-core-0.7.2/rostime/include/ros/time.h Examining data/ros-roscpp-core-0.7.2/rostime/src/duration.cpp Examining data/ros-roscpp-core-0.7.2/rostime/src/rate.cpp Examining data/ros-roscpp-core-0.7.2/rostime/src/time.cpp Examining data/ros-roscpp-core-0.7.2/rostime/test/duration.cpp Examining data/ros-roscpp-core-0.7.2/rostime/test/time.cpp FINAL RESULTS: data/ros-roscpp-core-0.7.2/cpp_common/include/ros/platform.h:51:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env_var_cstr = getenv(environment_variable); data/ros-roscpp-core-0.7.2/rostime/test/time.cpp:54:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(temp_time_struct.tv_usec); data/ros-roscpp-core-0.7.2/rostime/test/time.cpp:56:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(nullptr)); data/ros-roscpp-core-0.7.2/cpp_common/src/header.cpp:44:47: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define SROS_SERIALIZE_PRIMITIVE(ptr, data) { memcpy(ptr, &data, sizeof(data)); ptr += sizeof(data); } data/ros-roscpp-core-0.7.2/cpp_common/src/header.cpp:45:76: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define SROS_SERIALIZE_BUFFER(ptr, data, data_size) { if (data_size > 0) { memcpy(ptr, data, data_size); ptr += data_size; } } data/ros-roscpp-core-0.7.2/cpp_common/src/header.cpp:47:78: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define SROS_DESERIALIZE_BUFFER(ptr, data, data_size) { if (data_size > 0) { memcpy(data, ptr, data_size); ptr += data_size; } } data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:180:7: [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(stream.advance(sizeof(v)), &v, sizeof(v) ); \ data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:213:5: [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(stream.advance(1), &b, 1 ); data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:219:5: [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(&b, stream.advance(1), 1 ); data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:245:7: [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(stream.advance(static_cast<uint32_t>(len)), str.data(), len); data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:397:7: [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(stream.advance(data_len), &v.front(), data_len); data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:411:7: [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(static_cast<void*>(&v.front()), stream.advance(data_len), data_len); data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:564:5: [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(stream.advance(data_len), &v.front(), data_len); data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:571:5: [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(&v.front(), stream.advance(data_len), data_len); data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:81:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, T& t) \ data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:134:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, typename boost::call_traits<T>::reference t) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:163:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Serializer<T>::read(stream, t); data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:183:50: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template<typename Stream> inline static void read(Stream& stream, Type& v) \ data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:216:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template<typename Stream> inline static void read(Stream& stream, bool& v) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:250:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, StringType& str) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:284:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, ros::Time& v) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:310:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, ros::Duration& v) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:352:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, VecType& v) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:402:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, VecType& v) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:444:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, VecType& v) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:485:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). VectorSerializer<T, ContainerAllocator>::read(stream, t); data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:526:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, ArrayType& v) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:568:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, ArrayType& v) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:602:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline static void read(Stream& stream, ArrayType& v) data/ros-roscpp-core-0.7.2/roscpp_serialization/include/ros/serialization.h:633:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ArraySerializer<T, N>::read(stream, t); ANALYSIS SUMMARY: Hits = 30 Lines analyzed = 5326 in approximately 0.17 seconds (32208 lines/second) Physical Source Lines of Code (SLOC) = 3104 Hits@level = [0] 0 [1] 16 [2] 11 [3] 3 [4] 0 [5] 0 Hits@level+ = [0+] 30 [1+] 30 [2+] 14 [3+] 3 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 9.66495 [1+] 9.66495 [2+] 4.51031 [3+] 0.966495 [4+] 0 [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.