if (OpenSslEnv == NULL) {\r
OpenSslPath = OpenSslCommand;\r
} else {\r
- OpenSslPath = malloc(strlen(OpenSslEnv)+strlen(OpenSslCommand)+1);\r
+ //\r
+ // We add quotes to the Openssl Path in case it has space characters\r
+ //\r
+ OpenSslPath = malloc(2+strlen(OpenSslEnv)+strlen(OpenSslCommand)+1);\r
if (OpenSslPath == NULL) {\r
Error (NULL, 0, 4001, "Resource", "memory cannot be allocated!");\r
return GetUtilityStatus ();\r
{\r
UINT32 DefaultPathLen;\r
UINT64 Index;\r
-\r
+ CHAR8 QuotesStr[] = "\"";\r
+ strcpy(NewPath, QuotesStr);\r
DefaultPathLen = strlen(DefaultPath);\r
- strcpy(NewPath, DefaultPath);\r
+ strcat(NewPath, DefaultPath);\r
Index = 0;\r
- for (; Index < DefaultPathLen; Index ++) {\r
+ for (; Index < DefaultPathLen + 1; Index ++) {\r
if (NewPath[Index] == '\\' || NewPath[Index] == '/') {\r
if (NewPath[Index + 1] != '\0') {\r
NewPath[Index] = '/';\r
NewPath[Index + 1] = '\0';\r
}\r
strcat(NewPath, AppendPath);\r
+ strcat(NewPath, QuotesStr);\r
return EFI_SUCCESS;\r
}\r
\r