Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/lutok/dist lutok; fix strncpy -Wstringop-trunca...
details: https://anonhg.NetBSD.org/src/rev/c8e2a280f0ad
branches: trunk
changeset: 934973:c8e2a280f0ad
user: lukem <lukem%NetBSD.org@localhost>
date: Sun Jun 21 14:11:54 2020 +0000
description:
lutok; fix strncpy -Wstringop-truncation warning
diffstat:
external/bsd/lutok/dist/state.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 3b6b0dcd5c14 -r c8e2a280f0ad external/bsd/lutok/dist/state.cpp
--- a/external/bsd/lutok/dist/state.cpp Sun Jun 21 13:59:56 2020 +0000
+++ b/external/bsd/lutok/dist/state.cpp Sun Jun 21 14:11:54 2020 +0000
@@ -145,7 +145,7 @@
lutok::state state = lutok::state_c_gate::connect(raw_state);
return function(state);
} catch (const std::exception& e) {
- std::strncpy(error_buf, e.what(), sizeof(error_buf));
+ std::strncpy(error_buf, e.what(), sizeof(error_buf)-1);
} catch (...) {
std::strncpy(error_buf, "Unhandled exception in Lua C++ hook",
sizeof(error_buf));
Home |
Main Index |
Thread Index |
Old Index