From 1a56fc96a375cd5f15dc38f06899069549029f74 Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Thu, 19 Dec 2013 13:51:24 +0100
Subject: [PATCH] Fixed x509_crt_parse_path() bug on Windows platforms
---
ChangeLog | 1 +
library/x509_crt.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 3eadbccd66..cd3732f710 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@ Bugfix
* crypt_and_hash app checks MAC before final decryption
* Potential memory leak in ssl_ticket_keys_init()
* Memory leak in benchmark application
+ * Fixed x509_crt_parse_path() bug on Windows platforms
= PolarSSL 1.3.2 released on 2013-11-04
Features
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 63ab4030a7..8632f7140a 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -967,7 +967,7 @@ int x509_crt_parse_path( x509_crt *chain, const char *path )
p = filename + len;
filename[len++] = '*';
- w_ret = MultiByteToWideChar( CP_ACP, 0, path, len, szDir, MAX_PATH - 3 );
+ w_ret = MultiByteToWideChar( CP_ACP, 0, filename, len, szDir, MAX_PATH - 3 );
hFind = FindFirstFileW( szDir, &file_data );
if (hFind == INVALID_HANDLE_VALUE)