aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Besselink <sambesselink@planet.nl>2019-02-14 15:32:27 +0000
committerFabian Groffen <grobian@gentoo.org>2019-02-23 16:22:08 +0100
commit10de44241d6e3acd30e8e579f7f119510391651f (patch)
treeff4db7ea8fc0b8f95801c92a01f1f8d9efce4a4d
parentatom_explode: ignore slot matching operators (diff)
downloadportage-utils-10de44241d6e3acd30e8e579f7f119510391651f.tar.gz
portage-utils-10de44241d6e3acd30e8e579f7f119510391651f.tar.bz2
portage-utils-10de44241d6e3acd30e8e579f7f119510391651f.zip
In qtegrity.c make check_file use _Q_PATH_MAX when checking filename len
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--qtegrity.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/qtegrity.c b/qtegrity.c
index 0b30fb8..db139f1 100644
--- a/qtegrity.c
+++ b/qtegrity.c
@@ -245,9 +245,7 @@ static int get_size_digest(char * line)
static int check_file(char * filename)
{
- /* TODO, this is 4096 too low, because this variable also holds
- * path; for linux path is max 4096 chars */
- if (strlen(filename) > 255)
+ if (strlen(filename) > _Q_PATH_MAX)
err("Filename too long");
if (filename[0] != '/') {