summaryrefslogtreecommitdiff
path: root/ubi-utils/src/unubi.c
diff options
context:
space:
mode:
authorTom Rini <trini@embeddedalley.com>2008-12-08 01:02:00 -0700
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-12-08 20:45:47 +0200
commita8c858c45470aa6165acec2b2a3ca156124fdb2e (patch)
treef0b7752d5b30d59409b4ac57f77359fcf3ef35c3 /ubi-utils/src/unubi.c
parentc7929b71e476729c38895de3db8c1afcfabf5352 (diff)
ubi-utils: various fixes
gcc-4.3.x introduces a number of new warnings (and we use -Werror) for things like not checking scanf return values and not using explicit formatting. Finally, it caught that we were overflowing our own buffer in unubi.c, so increate the variable size as we want to declare and clear PATH_MAX + 1, then use only PATH_MAX of the variable. Signed-off-by: Tom Rini <trini@embeddedalley.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/unubi.c')
-rw-r--r--ubi-utils/src/unubi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ubi-utils/src/unubi.c b/ubi-utils/src/unubi.c
index ebd527c..7d65cfc 100644
--- a/ubi-utils/src/unubi.c
+++ b/ubi-utils/src/unubi.c
@@ -895,7 +895,7 @@ unubi_volumes(FILE* fpin, uint32_t *vols, size_t vc, struct args *a)
free(cur);
if (a->analyze) {
- char fname[PATH_MAX];
+ char fname[PATH_MAX + 1];
FILE *fp;
unubi_analyze(&head, first, a->odir_path);