projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sessiond: log error message when libkmod operations fail
[lttng-tools.git]
/
src
/
common
/
ini-config
/
ini.cpp
diff --git
a/src/common/ini-config/ini.cpp
b/src/common/ini-config/ini.cpp
index cca38f8ca7c9a693c65bfade4cbd0e60ee429dba..c17a8c0e8684b8d887b799abced290390775e989 100644
(file)
--- a/
src/common/ini-config/ini.cpp
+++ b/
src/common/ini-config/ini.cpp
@@
-178,6
+178,10
@@
int ini_parse_file(FILE *file, ini_entry_handler handler, void *user)
* Valid name[=:]value pair found, call
* handler
*/
* Valid name[=:]value pair found, call
* handler
*/
+ if (strlen(name) >= sizeof(prev_name)) {
+ /* Truncation occurs, report an error. */
+ error = lineno;
+ }
strncpy0(prev_name, name, sizeof(prev_name));
if (handler(user, section, name, value) < 0 && !error) {
error = lineno;
strncpy0(prev_name, name, sizeof(prev_name));
if (handler(user, section, name, value) < 0 && !error) {
error = lineno;
This page took
0.02397 seconds
and
4
git commands to generate.