From:             devzone dot my at gmail dot com
Operating system: all
PHP version:      Irrelevant
Package:          *General Issues
Bug Type:         Bug
Bug description:Static analyzer errors

Description:
------------
Version: 5.5.1 (Release)

**sapi**
[sapi/cgi/fastcgi.c:887]: (error) Uninitialized variable: hdr
[sapi/cli/php_cli.c:1289]: (error) Common realloc mistake: 'ini_entries'
nulled 
but not freed upon failure
[sapi/cli/php_cli.c:1299]: (error) Common realloc mistake: 'ini_entries'
nulled 
but not freed upon failure
[sapi/cli/php_cli.c:1305]: (error) Common realloc mistake: 'ini_entries'
nulled 
but not freed upon failure
[sapi/cli/php_cli.c:1345]: (error) Common realloc mistake: 'ini_entries'
nulled 
but not freed upon failure
[sapi/cgi/cgi_main.c:1547]: (error) Possible null pointer dereference: str
[sapi/fpm/fpm/fastcgi.c:513]: (error) Uninitialized variable: hdr
[sapi/fpm/fpm/fpm_sockets.c:80]: (error) Common realloc mistake:
'env_value' 
nulled but not freed upon failure
[sapi/isapi/stresstest/stresstest.cpp:589]: (error) Memory leak:
environment
[sapi/tux/php_tux.c:143]: (error) Common realloc mistake: 'vec' nulled but
not 
freed upon failure
 
**main**
[main/php_ini.c:675]: (error) Common realloc mistake:
'php_ini_scanned_files' 
nulled but not freed upon failure

**win32**
[win32/readdir.c:48]: (error) Memory leak: filespec

**TSRM**
[TSRM/TSRM.c:229]: (error) Common realloc mistake: 'resource_types_table'
nulled 
but not freed upon failure
[TSRM/TSRM.c:617]: (error) Uninitialized variable: mutexp

**ext**
[ereg/regex/regcomp.c:205]: (error) Uninitialized variable: c
[gd/libgd/gd_topal.c:1464]: (error) Uninitialized variable: shift_temp
[intl/calendar/calendar_methods.cpp:566]: (error) Uninitialized variable: 
variant
[intl/resourcebundle/resourcebundle_class.c:177]: (error) Uninitialized 
variable: rb
[intl/resourcebundle/resourcebundle_class.c:181]: (error) Uninitialized 
variable: rb
[mbstring/libmbfl/tests/conv_encoding.tests/gen_exp.c:257]: (error) Buffer
is 
accessed out of bounds.
[mbstring/libmbfl/tests/conv_encoding.tests/gen_exp.c:493]: (error)
Resource 
leak: fp
[mbstring/libmbfl/mbfl/mbfilter.c:1180]: (error) Uninitialized variable: 
needle_u8
[mbstring/oniguruma/enc/euc_jp.c:204]: (error) Uninitialized variable: r
[mbstring/oniguruma/enc/sjis.c:238]: (error) Uninitialized variable: r
[mbstring/oniguruma/regenc.c:852]: (error) Common realloc mistake: 'list'
nulled 
but not freed upon failure
[mbstring/ucgendat/ucgendat.c:484]: (error) Common realloc mistake:
'pdecomps' 
nulled but not freed upon failure
[mbstring/ucgendat/ucgendat.c:546]: (error) Common realloc mistake: 'title'

nulled but not freed upon failure
[mbstring/ucgendat/ucgendat.c:593]: (error) Common realloc mistake: 'upper'

nulled but not freed upon failure
[mbstring/ucgendat/ucgendat.c:640]: (error) Common realloc mistake: 'lower'

nulled but not freed upon failure
[mbstring/ucgendat/ucgendat.c:675]: (error) Common realloc mistake: 'ccl'
nulled 
but not freed upon failure
[mbstring/ucgendat/ucgendat.c:756]: (error) Common realloc mistake: 'nums'

nulled but not freed upon failure
[mbstring/ucgendat/ucgendat.c:794]: (error) Common realloc mistake:
'ncodes' 
nulled but not freed upon failure
[mbstring/oniguruma/regexec.c:2230]: (error) Uninitialized variable: len
[mbstring/oniguruma/regexec.c:2269]: (error) Uninitialized variable: len
[opcache/zend_accelerator_blacklist.c:133]: (error) Memory leak: regexp
[oci8/oci8.c:2817]: (error) Memory leak: session_pool
[opcache/zend_accelerator_blacklist.c:243]: (error) Resource leak: fp
[opcache/zend_accelerator_util_funcs.c:479]: (error) Uninitialized
variable: 
new_ce
[opcache/zend_accelerator_util_funcs.c:488]: (error) Uninitialized
variable: 
new_prototype
[opcache/zend_accelerator_util_funcs.c:590]: (error) Uninitialized
variable: 
new_ce
[odbc/php_odbc.c:2458]: (error) Uninitialized variable: rc
[snmp/snmp.c:1510]: (error) Uninitialized variable: a3
[snmp/snmp.c:1510]: (error) Uninitialized variable: a4
[snmp/snmp.c:1510]: (error) Uninitialized variable: a5
[snmp/snmp.c:1510]: (error) Uninitialized variable: a6
[snmp/snmp.c:1510]: (error) Uninitialized variable: a7
[standard/crypt_sha256.c:401]: (error) Possible null pointer dereference: 
copied_salt
[standard/crypt_sha512.c:435]: (error) Possible null pointer dereference: 
copied_salt
[sybase_ct/php_sybase_ct.c:792]: (error) Dereferencing 'sybase_ptr' after
it is 
deallocated / released
[sybase_ct/php_sybase_ct.c:796]: (error) Memory pointed to by 'sybase_ptr'
is 
freed twice.

 

Test script:
---------------
cppcheck php-5.5.1 -j4 2> err.txt


-- 
Edit bug report at https://bugs.php.net/bug.php?id=65433&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=65433&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=65433&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=65433&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=65433&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=65433&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=65433&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=65433&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=65433&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=65433&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=65433&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=65433&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=65433&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=65433&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65433&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=65433&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=65433&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=65433&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65433&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=65433&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=65433&r=mysqlcfg

Reply via email to