diff options
author | Richard Levitte <richard@levitte.org> | 2014-08-15 01:24:34 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2014-09-03 22:26:05 +0200 |
commit | a60aa7e0085e8a25a2a35c9522925aec1886b06e (patch) | |
tree | 2407412f979be73fa1c5a5b5d08511e3dc64b99b /crypto/LPdir_win.c | |
parent | a49256a349eb65b97f4829ce2a277a586115fdd9 (diff) |
Followup on RT3334 fix: make sure that a directory that's the empty
string returns 0 with errno = ENOENT.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 360928b7d0f16dde70e26841bbf9e1af727e8b8f)
Diffstat (limited to 'crypto/LPdir_win.c')
-rw-r--r-- | crypto/LPdir_win.c | 6 |
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) { |