X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2FLPdir_win.c;fp=crypto%2FLPdir_win.c;h=d5b5e2c900db9ea56522a75a49972213c01a741b;hp=5cdcd001a71eacfaee7f09b89584f457ead08142;hb=360928b7d0f16dde70e26841bbf9e1af727e8b8f;hpb=6a14fe7576e7a14a46ba14df8be8fe478536b4fb 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) {