diff options
author | marha <marha@users.sourceforge.net> | 2015-04-20 23:05:23 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-04-20 23:05:23 +0200 |
commit | 0f7871ff824bcf064db3ab6bdfe26645ba6c8087 (patch) | |
tree | 90d3d2b6112e083289c9cf68146852087814f6d3 /openssl/crypto/dso | |
parent | 934184bfecd402aae891b8740d788b486aa7269f (diff) | |
parent | 2a00e489122f6c4b525090dbdba2855a2ea2d519 (diff) | |
download | vcxsrv-0f7871ff824bcf064db3ab6bdfe26645ba6c8087.tar.gz vcxsrv-0f7871ff824bcf064db3ab6bdfe26645ba6c8087.tar.bz2 vcxsrv-0f7871ff824bcf064db3ab6bdfe26645ba6c8087.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
openssl/Makefile
Diffstat (limited to 'openssl/crypto/dso')
-rw-r--r-- | openssl/crypto/dso/dso_dlfcn.c | 7 | ||||
-rw-r--r-- | openssl/crypto/dso/dso_vms.c | 19 |
2 files changed, 20 insertions, 6 deletions
diff --git a/openssl/crypto/dso/dso_dlfcn.c b/openssl/crypto/dso/dso_dlfcn.c index c0fcbb18b..f629f0380 100644 --- a/openssl/crypto/dso/dso_dlfcn.c +++ b/openssl/crypto/dso/dso_dlfcn.c @@ -314,7 +314,7 @@ static char *dlfcn_merger(DSO *dso, const char *filespec1, return (NULL); } strcpy(merged, filespec2); - } else + } else { /* * This part isn't as trivial as it looks. It assumes that the * second file specification really is a directory, and makes no @@ -322,13 +322,12 @@ static char *dlfcn_merger(DSO *dso, const char *filespec1, * concatenation of filespec2 followed by a slash followed by * filespec1. */ - { int spec2len, len; spec2len = strlen(filespec2); - len = spec2len + (filespec1 ? strlen(filespec1) : 0); + len = spec2len + strlen(filespec1); - if (filespec2 && filespec2[spec2len - 1] == '/') { + if (spec2len && filespec2[spec2len - 1] == '/') { spec2len--; len--; } diff --git a/openssl/crypto/dso/dso_vms.c b/openssl/crypto/dso/dso_vms.c index 14d885df1..0eff96ec2 100644 --- a/openssl/crypto/dso/dso_vms.c +++ b/openssl/crypto/dso/dso_vms.c @@ -172,6 +172,7 @@ static int vms_load(DSO *dso) # endif /* __INITIAL_POINTER_SIZE == 64 */ const char *sp1, *sp2; /* Search result */ + const char *ext = NULL; /* possible extension to add */ if (filename == NULL) { DSOerr(DSO_F_VMS_LOAD, DSO_R_NO_FILENAME); @@ -214,11 +215,19 @@ static int vms_load(DSO *dso) /* Now, let's see if there's a type, and save the position in sp2 */ sp2 = strchr(sp1, '.'); /* + * If there is a period and the next character is a semi-colon, + * we need to add an extension + */ + if (sp2 != NULL && sp2[1] == ';') + ext = ".EXE"; + /* * If we found it, that's where we'll cut. Otherwise, look for a version * number and save the position in sp2 */ - if (sp2 == NULL) + if (sp2 == NULL) { sp2 = strchr(sp1, ';'); + ext = ".EXE"; + } /* * If there was still nothing to find, set sp2 to point at the end of the * string @@ -244,6 +253,11 @@ static int vms_load(DSO *dso) strncpy(p->imagename, filename, sp1 - filename); p->imagename[sp1 - filename] = '\0'; + if (ext) { + strcat(p->imagename, ext); + if (*sp2 == '.') + sp2++; + } strcat(p->imagename, sp2); p->filename_dsc.dsc$w_length = strlen(p->filename); @@ -525,7 +539,8 @@ static char *vms_name_converter(DSO *dso, const char *filename) { int len = strlen(filename); char *not_translated = OPENSSL_malloc(len + 1); - strcpy(not_translated, filename); + if(not_translated) + strcpy(not_translated, filename); return (not_translated); } |