Skip to content

Commit 9f9b257

Browse files
committed
Merge branch 'PHP-7.3'
* PHP-7.3: Fixed bug #77697 (Crash on Big_Endian platform)
2 parents d506097 + b419590 commit 9f9b257

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/phar/util.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,9 +1829,9 @@ int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signat
18291829
return FAILURE;
18301830
#endif
18311831
case PHAR_SIG_OPENSSL: {
1832-
size_t siglen;
18331832
unsigned char *sigbuf;
18341833
#ifdef PHAR_HAVE_OPENSSL
1834+
unsigned int siglen;
18351835
BIO *in;
18361836
EVP_PKEY *key;
18371837
EVP_MD_CTX *md_ctx;
@@ -1878,7 +1878,7 @@ int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signat
18781878
}
18791879
}
18801880

1881-
if (!EVP_SignFinal (md_ctx, sigbuf,(unsigned int *)&siglen, key)) {
1881+
if (!EVP_SignFinal (md_ctx, sigbuf, &siglen, key)) {
18821882
efree(sigbuf);
18831883
if (error) {
18841884
spprintf(error, 0, "unable to write phar \"%s\" with requested openssl signature", phar->fname);
@@ -1889,6 +1889,7 @@ int phar_create_signature(phar_archive_data *phar, php_stream *fp, char **signat
18891889
sigbuf[siglen] = '\0';
18901890
EVP_MD_CTX_destroy(md_ctx);
18911891
#else
1892+
size_t siglen;
18921893
sigbuf = NULL;
18931894
siglen = 0;
18941895
php_stream_seek(fp, 0, SEEK_END);

0 commit comments

Comments
 (0)