summaryrefslogtreecommitdiffstats
path: root/crypto/LPdir_win.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/LPdir_win.c')
-rw-r--r--crypto/LPdir_win.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/LPdir_win.c b/crypto/LPdir_win.c
index 5cdcd001a7..d5b5e2c900 100644
--- a/crypto/LPdir_win.c
+++ b/crypto/LPdir_win.c
@@ -66,6 +66,12 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
char *extdirbuf = NULL;
size_t dirlen = strlen (directory);
+ if (dirlen == 0)
+ {
+ errno = ENOENT;
+ return 0;
+ }
+
*ctx = (LP_DIR_CTX *)malloc(sizeof(LP_DIR_CTX));
if (*ctx == NULL)
{