aboutsummaryrefslogtreecommitdiff
path: root/src/libnpass
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-04-10 07:02:46 +0530
committersinanmohd <sinan@sinanmohd.com>2024-04-10 17:38:03 +0530
commit777eccb0458a8d223f8aea4ed1c673697def3a5d (patch)
tree6298cf10a03685e2a06940a590f36a924fbbc95e /src/libnpass
parentb1ea5e8d71bc6bcadde4ffd65584658a62a11b65 (diff)
libnpass/readstore_all/len: PATH_MAX -> 64
Diffstat (limited to 'src/libnpass')
-rw-r--r--src/libnpass/libnpass.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libnpass/libnpass.c b/src/libnpass/libnpass.c
index a918e77..6e4c874 100644
--- a/src/libnpass/libnpass.c
+++ b/src/libnpass/libnpass.c
@@ -16,6 +16,7 @@
#include "util.h"
#define DEF_PASS_DIR "pass"
+#define DEF_STOR_LEN 64
#define FPR_MAX NAME_MAX
static char pass_dir[PATH_MAX] = {0};
@@ -197,7 +198,7 @@ int readstore_all(const char *path, struct store **stor) {
void *p;
size_t i;
DIR *dirp;
- size_t len = PATH_MAX;
+ size_t len = DEF_STOR_LEN;
*stor = malloc(sizeof(struct store) * len);
if (!*stor)