Exploit databaseDownload repository ZIP
GH-68a106f50640b22c0bb32b6b806a797e
ahallais/php82-ubuntu2404-backport
Sources for CVE-2026-109618
411 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files47
ahallais/php82-ubuntu2404-backportRevision 7995f69c237f
- ↑..Parent directory
- murmur/
- sha3/
- tests/
- xxhash/
- CREDITS
- bench.php
- config.m4
- config.w32
- hash.c
- hash.stub.php
- hash_adler32.c
- hash_arginfo.h
- hash_crc32.c
- hash_fnv.c
- hash_gost.c
- hash_haval.c
- hash_joaat.c
- hash_md.c
- hash_murmur.c
- hash_ripemd.c
- hash_sha.c
- hash_sha3.c
- hash_snefru.c
- hash_tiger.c
- hash_whirlpool.c
- hash_xxhash.c
- php_hash.h
- php_hash_adler32.h
- php_hash_crc32.h
- php_hash_crc32_tables.h
- php_hash_fnv.h
- php_hash_gost.h
- php_hash_gost_tables.h
- php_hash_haval.h
- php_hash_joaat.h
- php_hash_md.h
- php_hash_murmur.h
- php_hash_ripemd.h
- php_hash_sha.h
- php_hash_sha3.h
- php_hash_snefru.h
- php_hash_snefru_tables.h
- php_hash_tiger.h
- php_hash_tiger_tables.h
- php_hash_whirlpool.h
- php_hash_whirlpool_tables.h
- php_hash_xxhash.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
sury/build/php8.2-8.2.35/ext/hash/hash_adler32.c
C · 2,561 bytes/*
+----------------------------------------------------------------------+
| Copyright (c) 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: |
| https://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: Michael Wallner <[email protected]> |
| Sara Golemon <[email protected]> |
+----------------------------------------------------------------------+
*/
#include "php_hash.h"
#include "php_hash_adler32.h"
PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args)
{
context->state = 1;
}
PHP_HASH_API void PHP_ADLER32Update(PHP_ADLER32_CTX *context, const unsigned char *input, size_t len)
{
uint32_t s[2];
s[0] = context->state & 0xffff;
s[1] = (context->state >> 16) & 0xffff;
for (size_t i = 0; i < len; ++i) {
s[0] += input[i];
s[1] += s[0];
if (s[1]>=0x7fffffff)
{
s[0] = s[0] % 65521;
s[1] = s[1] % 65521;
}
}
s[0] = s[0] % 65521;
s[1] = s[1] % 65521;
context->state = s[0] + (s[1] << 16);
}
PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX *context)
{
digest[0] = (unsigned char) ((context->state >> 24) & 0xff);
digest[1] = (unsigned char) ((context->state >> 16) & 0xff);
digest[2] = (unsigned char) ((context->state >> 8) & 0xff);
digest[3] = (unsigned char) (context->state & 0xff);
context->state = 0;
}
PHP_HASH_API int PHP_ADLER32Copy(const php_hash_ops *ops, PHP_ADLER32_CTX *orig_context, PHP_ADLER32_CTX *copy_context)
{
copy_context->state = orig_context->state;
return SUCCESS;
}
const php_hash_ops php_hash_adler32_ops = {
"adler32",
(php_hash_init_func_t) PHP_ADLER32Init,
(php_hash_update_func_t) PHP_ADLER32Update,
(php_hash_final_func_t) PHP_ADLER32Final,
(php_hash_copy_func_t) PHP_ADLER32Copy,
php_hash_serialize,
php_hash_unserialize,
PHP_ADLER32_SPEC,
4, /* what to say here? */
4,
sizeof(PHP_ADLER32_CTX),
0
};