[vlc-devel] commit: RTMP: factorization ( R??mi Denis-Courmont )

jpd at videolan.org jpd at videolan.org
Wed Nov 18 13:18:28 CET 2009


On Wed, Nov 18, 2009 at 11:27:55AM +0100, R??mi Denis-Courmont wrote:
> On Wed, 18 Nov 2009 10:17:51 +0100, jpd at videolan.org wrote:
> > On Tue, Nov 17, 2009 at 08:35:17PM +0100, git version control wrote:
> >> vlc | branch: master | R?mi Denis-Courmont <remi at remlab.net> | [...]
> > [...]
> >>              i_ret = net_Write( p_sys->p_thread, p_sys->p_thread->fd,
> > NULL, tmp_buffer, rtmp_packet->length_encoded );
> >> +            free( rtmp_packet->body->body );
> >> +            free( rtmp_packet->body );
> >> +            free( rtmp_packet );
> >> +            free( tmp_buffer );
> >>              if( i_ret != rtmp_packet->length_encoded )
> >>              {
> > 
> > This introduces a deref-after-free bug here as does the other part of
> > the commit (omitted).
> 
> Frankly, I don't care. This piece of code is so low quality that I would
> rather remove it completely.

Thank you for this wonderful answer. Thank you so much. Let me remind
you then: Refactoring is not supposed to introduce new bugs.





More information about the vlc-devel mailing list