X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2FLPdir_vms.c;h=e35363fd6614443db7984517be54554739a4381a;hb=bed4afa81b9c94596cae44226e7506d9b07fe5a5;hp=88c7ddd85c05ae2024ca92258cf8cbd6250232fd;hpb=0f113f3ee4d629ef9a4a30911b22b224772085e5;p=openssl.git diff --git a/crypto/LPdir_vms.c b/crypto/LPdir_vms.c index 88c7ddd85c..e35363fd66 100644 --- a/crypto/LPdir_vms.c +++ b/crypto/LPdir_vms.c @@ -1,4 +1,16 @@ /* + * Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +/* + * This file is dual-licensed and is also available under the following + * terms: + * * Copyright (c) 2004, Richard Levitte * All rights reserved. * @@ -104,12 +116,12 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory) return 0; } - *ctx = (LP_DIR_CTX *)malloc(sizeof(LP_DIR_CTX)); + *ctx = malloc(sizeof(**ctx)); if (*ctx == NULL) { errno = ENOMEM; return 0; } - memset(*ctx, '\0', sizeof(LP_DIR_CTX)); + memset(*ctx, 0, sizeof(**ctx)); strcpy((*ctx)->filespec, directory); strcat((*ctx)->filespec, "*.*;");