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/a5779b8b7e4b
branches: trunk
changeset: 973123:a5779b8b7e4b
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 a6175426886c -r a5779b8b7e4b 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