bonitao / cmph Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
It would great if you were provided little description or some tags or something like official mirror™ of cmph. Then it would be much more easier to find origins and obsolete mirrors of cmph do not get in top of search response.
Hi,
I'm the maintainer of the cmph package in Debian and created a few MR on sourceforge a few weeks ago but now I'm wondering if the main entrypoint is now Github or is still SourceForge?
I can move them to Github if necessary.
The MR I'm referring to are:
https://sourceforge.net/p/cmph/git/merge-requests/5/
https://sourceforge.net/p/cmph/git/merge-requests/6/
https://sourceforge.net/p/cmph/git/merge-requests/7/
Thanks for your help,
Joseph
I tried to compile the library and I get these errors:
1>sdbm_hash.c
1>C:\work\cmph-git\src\sdbm_hash.c(8,34): error C2065: 'CMPH_HASH_SDBM': undeclared identifier
1>C:\work\cmph-git\src\sdbm_hash.c(48,34): error C2065: 'CMPH_HASH_SDBM': undeclared identifier
1>fnv_hash.c
1>C:\work\cmph-git\src\fnv_hash.c(8,33): error C2065: 'CMPH_HASH_FNV': undeclared identifier
1>C:\work\cmph-git\src\fnv_hash.c(53,33): error C2065: 'CMPH_HASH_FNV': undeclared identifier
1>djb2_hash.c
1>C:\work\cmph-git\src\djb2_hash.c(7,24): error C2065: 'djb2_state': undeclared identifier
1>C:\work\cmph-git\src\djb2_hash.c(8,34): error C2065: 'CMPH_HASH_DJB2': undeclared identifier
1>C:\work\cmph-git\src\djb2_hash.c(48,34): error C2065: 'CMPH_HASH_DJB2': undeclared identifier
1>czech.c
1>c1 : fatal error C1083: Cannot open source file: 'src\czech.c': No such file or directory
There is no way for this code to compile. Can you please commit version that actually builds?
The following memcpy()
in buffer_entry.c
is incorrect:
cmph_uint32 * keylen
[...]
memcpy(keylen + copied_bytes, buffer_entry->buff + buffer_entry->pos, (size_t)lacked_bytes)
;
Because cmph_uint32
has a length of 4 bytes, pointer arithmetic adds 4 bytes at a time, whereas copied_bytes
is measured in bytes.
When copied_bytes
is non-zero, the destination address for the memcpy
is wrong resulting in stack corruption.
Therefore, it should be
memcpy((cmph_uint8 *)keylen + copied_bytes, buffer_entry->buff + buffer_entry->pos, (size_t)lacked_bytes);
It seems to be wrong in all branches.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.