summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-11-18 18:05:20 +0100
committerDavid Sterba <dsterba@suse.cz>2014-11-18 18:05:20 +0100
commit5ebf59ff5852dd4f37d99ab4e49fef1c579d6665 (patch)
tree00b25fda52adddd8319ae8a859f56189f816f1e5 /utils.h
parenta1c3bcf1c294909801dbc23e77cac895dd14c41e (diff)
btrfs-progs: use proper size for argv0 substitution
Make run from a long base path will overflow the argv0 buffer during tests. Otherwise, this would happen for all the standalone binaries that use set_argv0. Original report: https://bbs.archlinux.org/viewtopic.php?id=189861 Reported-by: WorMzy Tykashi <wormzy.tykashi@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.h b/utils.h
index 8c946246..289e86b4 100644
--- a/utils.h
+++ b/utils.h
@@ -38,7 +38,7 @@
#define BTRFS_UUID_UNPARSED_SIZE 37
-#define ARGV0_BUF_SIZE 64
+#define ARGV0_BUF_SIZE PATH_MAX
int check_argc_exact(int nargs, int expected);
int check_argc_min(int nargs, int expected);