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
That memset does not clear the entire structure. It only clears 4 or 8 bytes, depending on the size of the ctx pointer. It should use sizeof(*ctx) not sizeof(ctx). This is old bug from the original md5.c.
Note that the code that follows relies on the bug. If the memset bug is fixed then there could be a memory leak of the internal_buf. I suggest that the memset should be fixed and moved after the internal_buf code.
src/libFLAC/md5.c, line 266 you can find:
That memset does not clear the entire structure. It only clears 4 or 8 bytes, depending on the size of the ctx pointer. It should use sizeof(*ctx) not sizeof(ctx). This is old bug from the original md5.c.
Note that the code that follows relies on the bug. If the memset bug is fixed then there could be a memory leak of the internal_buf. I suggest that the memset should be fixed and moved after the internal_buf code.
This should work:
The text was updated successfully, but these errors were encountered: