From:             Mr dot Miteshah at gmail dot com
Operating system: Ubuntu
PHP version:      8.0.0RC5
Package:          PECL
Bug Type:         Bug
Bug description:mcrypt-1.0.3/mcrypt.c Missing ; on codes

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 bug report at https://bugs.php.net/bug.php?id=80424&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80424&r=fixed
Fixed in release:                 
https://bugs.php.net/fix.php?id=80424&r=alreadyfixed
Need backtrace:                   
https://bugs.php.net/fix.php?id=80424&r=needtrace
Need Reproduce Script:            
https://bugs.php.net/fix.php?id=80424&r=needscript
Try newer version:                
https://bugs.php.net/fix.php?id=80424&r=oldversion
Not developer issue:              
https://bugs.php.net/fix.php?id=80424&r=support
Expected behavior:                
https://bugs.php.net/fix.php?id=80424&r=notwrong
Not enough info:                  
https://bugs.php.net/fix.php?id=80424&r=notenoughinfo
Submitted twice:                  
https://bugs.php.net/fix.php?id=80424&r=submittedtwice
register_globals:                 
https://bugs.php.net/fix.php?id=80424&r=globals
PHP version support discontinued: 
https://bugs.php.net/fix.php?id=80424&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80424&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80424&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80424&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80424&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80424&r=nozend
MySQL Configuration Error:        
https://bugs.php.net/fix.php?id=80424&r=mysqlcfg

-- 
PECL development discussion Mailing List (https://pecl.php.net/)
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to