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
In winpr/libwinpr/crt/alignment.c::_aligned_offset_malloc(), the size computation passed to malloc can overflow, causing malloc to allocate a buffer which is too small:
82 /* minimum alignment is pointer size */
83 if (alignment < sizeof(void*))
84 alignment = sizeof(void*);
85
86 /* malloc size + alignment to make sure we can align afterwards */
87 base = malloc(size + alignment + sizeof(WINPR_ALIGNED_MEM));
In the same function, the comment does not match the following check.
74 /* alignment must be a power of 2 */
75 if (alignment % 2 == 1)
76 return NULL;
The text was updated successfully, but these errors were encountered:
In winpr/libwinpr/crt/alignment.c::_aligned_offset_malloc(), the size computation passed to
malloc
can overflow, causingmalloc
to allocate a buffer which is too small:In the same function, the comment does not match the following check.
The text was updated successfully, but these errors were encountered: