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
While browsing your code I found some code that may cause problem under some circumstance.
Location:
mlt_pool.c
static void *pool_fetch( mlt_pool self
This seems to be wrong:mlt_release release = mlt_alloc( self->size )
It should be mlt_release release = mlt_alloc( self->size + sizeof( struct mlt_release_s )) ;
Reason? the caller expects to get size but it fact, the caller gets size- sizeof( struct mlt_release_s );
See this line: ptr = ( char * )release + sizeof( struct mlt_release_s );
Allocated size is reduced by mit_release_s.....
J.
The text was updated successfully, but these errors were encountered:
I understand your concern, but I think your analysis was incomplete. The main caller entry point is mlt_pool_alloc(), which includes this: size += sizeof( struct mlt_release_s );
A size request that is near or equal to a power of two will be pushed into a pool based on the next higher order power of two and not receive a memory block size less than requested. If you still believe there is a problem, please submit a test case and patch.
Hi,
While browsing your code I found some code that may cause problem under some circumstance.
Location:
mlt_pool.c
static void *pool_fetch( mlt_pool self
This seems to be wrong:mlt_release release = mlt_alloc( self->size )
It should be mlt_release release = mlt_alloc( self->size + sizeof( struct mlt_release_s )) ;
Reason? the caller expects to get size but it fact, the caller gets size- sizeof( struct mlt_release_s );
See this line: ptr = ( char * )release + sizeof( struct mlt_release_s );
Allocated size is reduced by mit_release_s.....
J.
The text was updated successfully, but these errors were encountered: