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
There is the use of unsigned int* in all of the CallbackSetProperty function's errorCode parameter.
The Problem:
Machines assume the size of an unsigned int. In other words, 64-bit machines will assume an integer to be 64 bits whereas 32-bit machines assume they are 32 bits. Thus, when a 64-bit machine tries to read an "unsigned int" from a 32-bit machine, it will read twice the amount of bits necessary, leading to unknown issues. A possible error could be seen below, where a pointer that is set to be allocated 16 bits of memory (unsigned int* declared by 16-bit machine) fails to convert into a pointer that is meant to have 32 bits of allocated memory:
We expect to avoid the error by standardizing the size of the unsigned integer.
There is the use of
unsigned int*
in all of the CallbackSetProperty function's errorCode parameter.The Problem:
Machines assume the size of an
unsigned int
. In other words, 64-bit machines will assume an integer to be 64 bits whereas 32-bit machines assume they are 32 bits. Thus, when a 64-bit machine tries to read an "unsigned int" from a 32-bit machine, it will read twice the amount of bits necessary, leading to unknown issues. A possible error could be seen below, where a pointer that is set to be allocated 16 bits of memory (unsigned int*
declared by 16-bit machine) fails to convert into a pointer that is meant to have 32 bits of allocated memory:We expect to avoid the error by standardizing the size of the unsigned integer.
BACnetServerExampleCPP version: 8eec294
The text was updated successfully, but these errors were encountered: