Exploit databaseDownload repository ZIP
GH-f103b497572b6405c32a7cd6514c0d99
zhqagp/php-7.2
Sources for CVE-2026-109618
412 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files144
zhqagp/php-7.2Revision 2139335c0281
- ↑..Parent directory
- html_tables/
- tests/
- Makefile.frag
- Makefile.frag.w32
- array.c
- assert.c
- base64.c
- base64.h
- basic_functions.c
- basic_functions.h
- browscap.c
- config.m4
- config.w32
- crc32.c
- crc32.h
- credits.c
- credits.h
- credits_ext.h
- credits_sapi.h
- crypt.c
- crypt_blowfish.c
- crypt_blowfish.h
- crypt_freesec.c
- crypt_freesec.h
- crypt_sha256.c
- crypt_sha512.c
- css.c
- css.h
- cyr_convert.c
- cyr_convert.h
- datetime.c
- datetime.h
- dir.c
- dl.c
- dl.h
- dns.c
- dns_win32.c
- exec.c
- exec.h
- file.c
- file.h
- filestat.c
- filters.c
- flock_compat.c
- flock_compat.h
- formatted_print.c
- fsock.c
- fsock.h
- ftok.c
- ftp_fopen_wrapper.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
ext/standard/rand.c
C · 2,620 bytes/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2018 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Rasmus Lerdorf <[email protected]> |
| Zeev Suraski <[email protected]> |
| Pedro Melo <[email protected]> |
| Sterling Hughes <[email protected]> |
| |
| Based on code from: Richard J. Wagner <[email protected]> |
| Makoto Matsumoto <[email protected]> |
| Takuji Nishimura |
| Shawn Cokus <[email protected]> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#include "php.h"
#include "php_rand.h"
#include "php_mt_rand.h"
/* {{{ php_srand
*/
PHPAPI void php_srand(zend_long seed)
{
php_mt_srand(seed);
}
/* }}} */
/* {{{ php_rand
*/
PHPAPI zend_long php_rand(void)
{
return php_mt_rand();
}
/* }}} */
/* {{{ proto int mt_rand([int min, int max])
Returns a random number from Mersenne Twister */
PHP_FUNCTION(rand)
{
zend_long min;
zend_long max;
int argc = ZEND_NUM_ARGS();
if (argc == 0) {
RETURN_LONG(php_mt_rand() >> 1);
}
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_LONG(min)
Z_PARAM_LONG(max)
ZEND_PARSE_PARAMETERS_END();
if (max < min) {
RETURN_LONG(php_mt_rand_common(max, min));
}
RETURN_LONG(php_mt_rand_common(min, max));
}
/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/