Bug #80424 [Asn->Csd]: mcrypt-1.0.3/mcrypt.c Missing ; on codes
| From: | nikic@php.net | Date: | Thu, 26 Nov 2020 14:06:34 +0000 |
| Subject: | Bug #80424 [Asn->Csd]: mcrypt-1.0.3/mcrypt.c Missing ; on codes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-230644@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80424&edit=1
ID: 80424
Updated by: nikic@php.net
Reported by: Mr dot Miteshah at gmail dot com
Summary: mcrypt-1.0.3/mcrypt.c Missing ; on codes
-Status: Assigned
+Status: Closed
Type: Bug
Package: mcrypt related
Operating System: Ubuntu
PHP Version: 8.0.0RC5
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
Fixed by https://github.com/php/pecl-encryption-mcrypt/commit/11de239f9ca99e852a4d94258edf1a9f64f96c8c.
Previous Comments:
------------------------------------------------------------------------
[2020-11-26 13:56:26] cmb@php.net
Indeed, a PHP 8 issue only (formerly that semicolon was not
required). Anyhow, that would be covered by
<https://github.com/php/pecl-encryption-mcrypt/pull/6>,
but I do
not understand why someone still wanted to use mcrypt with PHP 8.
------------------------------------------------------------------------
[2020-11-26 13:51:08] Mr dot Miteshah at gmail dot com
Description:
------------
The last make command give us following errors when i checked code
; was missing on few
functons.
vim /tmp/mcrypt-1.0.3/mcrypt.c +687
if (data_len == 0) {
php_error_docref(NULL, E_WARNING, "An empty string was passed");
RETURN_FALSE
}
/* Check blocksize */
if (data_len > INT_MAX) {
php_error_docref(NULL, E_WARNING, "Data size too large, %d maximum",
INT_MAX);
RETURN_FALSE;
}
As you see on first function RETURN_FALSE was missing ; while same code on 2nd function
had ; added properly.
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7f35c2297a10) = 9921
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(-1, libtool: compile: cc -I. -I/tmp/mcrypt-1.0.3 -I/tmp/mcrypt-1.0.3/include
-I/tmp/mcrypt-1.0.3/main -I/tmp/mcrypt-1.0.3 -I/usr/include/php/20200930
-I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend
-I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -DHAVE_CONFIG_H -g -O2
-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/mcrypt-1.0.3/mcrypt.c -fPIC -DPIC -o .libs/mcrypt.o
/tmp/mcrypt-1.0.3/mcrypt.c: In function âzif_mdecrypt_genericâ:
/tmp/mcrypt-1.0.3/mcrypt.c:687:2: error: expected â;â before â}â token
}
^
/tmp/mcrypt-1.0.3/mcrypt.c: In function âzif_mcrypt_generic_deinitâ:
/tmp/mcrypt-1.0.3/mcrypt.c:766:2: error: expected â;â before â}â token
}
^
/tmp/mcrypt-1.0.3/mcrypt.c:769:1: error: expected â;â before â}â token
}
^
/tmp/mcrypt-1.0.3/mcrypt.c: In function âzif_mcrypt_enc_is_block_algorithm_modeâ:
/tmp/mcrypt-1.0.3/mcrypt.c:780:2: error: expected â;â before â}â token
} else {
^
/tmp/mcrypt-1.0.3/mcrypt.c:780:4: error: expected â}â before âelseâ
} else {
^~~~
/tmp/mcrypt-1.0.3/mcrypt.c:782:2: error: expected â;â before â}â token
}
^
/tmp/mcrypt-1.0.3/mcrypt.c: In function âzif_mcrypt_enc_is_block_algorithmâ:
/tmp/mcrypt-1.0.3/mcrypt.c:794:2: error: expected â;â before â}â token
} else {
^
/tmp/mcrypt-1.0.3/mcrypt.c:794:4: error: expected â}â before âelseâ
} else {
^~~~
/tmp/mcrypt-1.0.3/mcrypt.c:796:2: error: expected â;â before â}â token
}
^
/tmp/mcrypt-1.0.3/mcrypt.c: In function âzif_mcrypt_enc_is_block_modeâ:
/tmp/mcrypt-1.0.3/mcrypt.c:808:2: error: expected â;â before â}â token
} else {
^
/tmp/mcrypt-1.0.3/mcrypt.c:808:4: error: expected â}â before âelseâ
} else {
^~~~
/tmp/mcrypt-1.0.3/mcrypt.c:810:2: error: expected â;â before â}â token
}
^
/tmp/mcrypt-1.0.3/mcrypt.c:1144:14: error: invalid storage class for function
âphp_mcrypt_get_key_size_strâ
static char *php_mcrypt_get_key_size_str(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/mcrypt-1.0.3/mcrypt.c:1181:18: error: invalid storage class for function
âphp_mcrypt_is_valid_key_sizeâ
static zend_bool php_mcrypt_is_valid_key_size(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/mcrypt-1.0.3/mcrypt.c:1205:12: error: invalid storage class for function
âphp_mcrypt_ensure_valid_key_sizeâ
static int php_mcrypt_ensure_valid_key_size(MCRYPT td, int key_size) /* {{{ */
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/mcrypt-1.0.3/mcrypt.c:1232:12: error: invalid storage class for function
âphp_mcrypt_ensure_valid_ivâ
static int php_mcrypt_ensure_valid_iv(MCRYPT td, const char *iv, int iv_size) /* {{{ */
^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/mcrypt-1.0.3/mcrypt.c:1261:13: error: invalid storage class for function
âphp_mcrypt_do_cryptâ
static void php_mcrypt_do_crypt(char* cipher, const char *key, size_t key_len, const char *data,
size_t data_len, char *mode, const char *iv, size_t iv_len, size_t dencrypt, zval* return_value) /*
{{{ */
^~~~~~~~~~~~~~~~~~~
/tmp/mcrypt-1.0.3/mcrypt.c:1421:1: error: expected declaration or statement at end of input
}
^
/tmp/mcrypt-1.0.3/mcrypt.c: In function âzif_mcrypt_enc_is_block_algorithmâ:
/tmp/mcrypt-1.0.3/mcrypt.c:1421:1: error: expected declaration or statement at end of input
/tmp/mcrypt-1.0.3/mcrypt.c: In function âzif_mcrypt_enc_is_block_algorithm_modeâ:
/tmp/mcrypt-1.0.3/mcrypt.c:1421:1: error: expected declaration or statement at end of input
/tmp/mcrypt-1.0.3/mcrypt.c: In function âzif_mcrypt_generic_deinitâ:
/tmp/mcrypt-1.0.3/mcrypt.c:1421:1: error: expected declaration or statement at end of input
/tmp/mcrypt-1.0.3/mcrypt.c:1421:1: error: expected declaration or statement at end of input
/tmp/mcrypt-1.0.3/mcrypt.c: In function âzif_mdecrypt_genericâ:
/tmp/mcrypt-1.0.3/mcrypt.c:1421:1: error: expected declaration or statement at end of input
[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 9921
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=9921, si_uid=0, si_status=1, si_utime=4,
si_stime=0} ---
rt_sigreturn({mask=[]}) = 9921
openat(AT_FDCWD, "/usr/share/locale/C.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/C.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No
such file or directory)
openat(AT_FDCWD, "/usr/share/locale/C/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such
file or directory)
openat(AT_FDCWD, "/usr/share/locale-langpack/C.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale-langpack/C.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale-langpack/C/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)
write(1, "Makefile:209: recipe for target "..., 51Makefile:209: recipe for target
'mcrypt.lo' failed
) = 51
write(2, "make: *** [mcrypt.lo] Error 1\n", 30make: *** [mcrypt.lo] Error 1
) = 30
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
chdir("/tmp/mcrypt-1.0.3") = 0
close(1) = 0
exit_group(2) = ?
+++ exited with 2 +++
Test script:
---------------
wget -O /tmp/mcrypt-1.0.3.tgz http://pecl.php.net/get/mcrypt-1.0.3.tgz
cd /tmp
tar xf mcrypt-1.0.3.tgz
cd mcrypt-1.0.3
phpize8.0
./configure --with-php-config=/usr/bin/php-config8.0
make clean
make
Expected result:
----------------
make command work without any error.
Actual result:
--------------
make command failed.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80424&edit=1