projects
/
platform
/
core
/
system
/
libstorage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a57c5f0
)
Fix stringop-truncation error
56/232756/1
author
Slava Barinov
<v.barinov@samsung.com>
Thu, 7 May 2020 10:13:52 +0000
(13:13 +0300)
committer
Slava Barinov
<v.barinov@samsung.com>
Thu, 7 May 2020 10:13:52 +0000
(13:13 +0300)
src/statvfs.c:121:4: error: 'strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation]
Change-Id: I328d339e73aeaff2c34db5531b0a3a30ece8f0ed
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
src/statvfs.c
patch
|
blob
|
history
diff --git
a/src/statvfs.c
b/src/statvfs.c
index
976e1d0
..
e7e9e56
100644
(file)
--- a/
src/statvfs.c
+++ b/
src/statvfs.c
@@
-118,7
+118,7
@@
static int config_parse(const char *file_name, int cb(struct parse_result *resul
}
*end = '\0';
- strncpy(section, start + 1, sizeof(section));
+ strncpy(section, start + 1, sizeof(section)
- 1
);
section[MAX_SECTION-1] = '\0';
} else if (*start) {
/* parse name & value */