Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:rkwasny
php
php-5.1.2-phpbug-36306.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php-5.1.2-phpbug-36306.patch of Package php
--- ext/standard/crc32.c 2006/01/01 12:50:14 1.16.2.1 +++ ext/standard/crc32.c 2006/02/09 15:33:53 1.16.2.3 @@ -23,24 +23,22 @@ #include "basic_functions.h" #include "crc32.h" -/* {{{ proto string crc32(string str) - Calculate the crc32 polynomial of a string */ PHP_NAMED_FUNCTION(php_if_crc32) { - unsigned int crc = ~0; char *p; int len, nr; - + php_uint32 crcinit = 0; + register php_uint32 crc; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &p, &nr) == FAILURE) { return; } + crc = crcinit^0xFFFFFFFF; - len = 0 ; - for (len += nr; nr--; ++p) { - CRC32(crc, *p); + for (len =+nr; nr--; ++p) { + crc = ((crc >> 8) & 0x00FFFFFF) ^ crc32tab[(crc ^ (*p)) & 0xFF ]; } - RETVAL_LONG(~crc); + RETVAL_LONG(crc^0xFFFFFFFF); } -/* }}} */ /* * Local variables:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor