From 78a10f201e025a1a6d94d3bb226123260f4be8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Basg=C3=B6ze?= Date: Wed, 25 Aug 2021 13:43:29 +0200 Subject: [PATCH] Use memcpy instead of strcpy --- resources/3rdparty/sylvan/src/storm_wrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/3rdparty/sylvan/src/storm_wrapper.cpp b/resources/3rdparty/sylvan/src/storm_wrapper.cpp index 4a9aeffe4..5e3e78c83 100644 --- a/resources/3rdparty/sylvan/src/storm_wrapper.cpp +++ b/resources/3rdparty/sylvan/src/storm_wrapper.cpp @@ -414,11 +414,11 @@ char* storm_rational_function_to_str(storm_rational_function_ptr val, char* buf, ss << srf_a; std::string s = ss.str(); if (s.size() + 1 < buflen) { - std::strcpy(buf, s.c_str()); + std::memcpy(buf, s.c_str(), s.size() + 1); return buf; } else { char* result = static_cast(malloc(s.size() + 1)); - std::strcpy(result, s.c_str()); + std::memcpy(result, s.c_str(), s.size() + 1); return result; } }