Incorrect memset size
Brought to you by:
mteel
In radlib 2.12.0:
../src/radsha.c:477:32: warning: 'memset' call operates on objects of type 'struct SHA1Context' while the size is based on a different type 'struct SHA1Context *' [-Wsizeof-pointer-memaccess]
memset (context, 0, sizeof(context)); /* In case it's sensitive */
~~~~~~~ ^~~~~~~
../src/radsha.c:477:32: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
memset (context, 0, sizeof(context)); /* In case it's sensitive */
^~~~~~~
../src/radsha.c:499:36: warning: 'memset' call operates on objects of type 'struct SHA1Context' while the size is based on a different type 'struct SHA1Context *' [-Wsizeof-pointer-memaccess]
memset (context, 0, sizeof(context));
~~~~~~~ ^~~~~~~
../src/radsha.c:499:36: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
memset (context, 0, sizeof(context));
^~~~~~~
../src/radsha.c:736:32: warning: 'memset' call operates on objects of type 'SHA256_CTX' (aka 'struct _SHA256_CTX') while the size is based on a different type 'SHA256_CTX *' (aka 'struct _SHA256_CTX *') [-Wsizeof-pointer-memaccess]
memset (context, 0, sizeof(context));
~~~~~~~ ^~~~~~~
../src/radsha.c:736:32: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
memset (context, 0, sizeof(context));
^~~~~~~
../src/radsha.c:759:36: warning: 'memset' call operates on objects of type 'SHA256_CTX' (aka 'struct _SHA256_CTX') while the size is based on a different type 'SHA256_CTX *' (aka 'struct _SHA256_CTX *') [-Wsizeof-pointer-memaccess]
memset (context, 0, sizeof(context));
~~~~~~~ ^~~~~~~
../src/radsha.c:759:36: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
memset (context, 0, sizeof(context));
^~~~~~~
4 warnings generated.