You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For 64bit platform based on GNU/Linux (amd64) at least one type length mismatch between BGET <-> lobaro has been found causing stack smashing. The problem is that BGET originally is based on basic types e.g. int, long, etc. and lobaro uses fixed size ones, e.g. int32_t, etc. When BGET-functions return values via pointers to lobaro funcs. they (may) overwrite the stack on platforms where length mismatch occurs - e.g. for GNU/Linux amd64 long is 64bit vs. int32_t (as according to spec. long has to be at least 32bit).
The following example of affected code is related to nget, nrel variables (int32_t vs. long) :
Of course mentioned issue does not occur when we compile it for 32bit - there no such mismatch occurs because long data type is 32bit.
I think that either BGET original implementation should be rewritten to use fixed size data types or at least some caution in README.md added that 64bit platforms may not be fully supported.
The text was updated successfully, but these errors were encountered:
I would prefer to use free and malloc from the API struct in future to allow users to supply their own implementations e.g. from stdlib.
I'm just don't have the time to implement the refactoring at the moment.
For 64bit platform based on GNU/Linux (amd64) at least one type length mismatch between BGET <-> lobaro has been found causing stack smashing. The problem is that BGET originally is based on basic types e.g. int, long, etc. and lobaro uses fixed size ones, e.g. int32_t, etc. When BGET-functions return values via pointers to lobaro funcs. they (may) overwrite the stack on platforms where length mismatch occurs - e.g. for GNU/Linux amd64 long is 64bit vs. int32_t (as according to spec. long has to be at least 32bit).
The following example of affected code is related to nget, nrel variables (int32_t vs. long) :
Of course mentioned issue does not occur when we compile it for 32bit - there no such mismatch occurs because long data type is 32bit.
I think that either BGET original implementation should be rewritten to use fixed size data types or at least some caution in README.md added that 64bit platforms may not be fully supported.
The text was updated successfully, but these errors were encountered: