synopse / mORMot2

OpenSource RESTful ORM/SOA/MVC Framework for Delphi and FreePascal
https://synopse.info
Other
531 stars 132 forks source link

Wrong type definition in C runtime functions #324

Open zedxxx opened 3 hours ago

zedxxx commented 3 hours ago

The size parameter of the integer type must be replaced with the size_t (or NativeUInt) type in functions: strncmp, memcmp

https://github.com/synopse/mORMot2/blob/master/src/lib/mormot.lib.static.pas#L82

https://github.com/synopse/mORMot2/blob/master/src/db/mormot.db.raw.sqlite3.static.pas#L475

zedxxx commented 2 hours ago

Same for realloc, memmove, memcpy, memset

https://github.com/synopse/mORMot2/blob/master/src/db/mormot.db.raw.sqlite3.static.pas#L415

synopse commented 1 hour ago

Did you encounter any problem due to this issue? From the asm point of view, it makes no difference with values up to 2GB in size.

I will review the code about this.