[vlc-devel] Re: vlc: svn commit r17765 (courmisch) ?!
Marian Durkovic
md at bts.sk
Wed Nov 15 08:01:37 CET 2006
> r17765 | courmisch | 2006-11-14 21:07:18 +0100 (Tue, 14 Nov 2006) | 3 lines
> Changed paths:
> M /branches/0.8.6/modules/services_discovery/sap.c
>
> Revert crappy revert [17764] and fix off-by-one error as in trunk.
OK, since you've done this for the n-th time, you deserve it:
PLEASE STOP BLAMING/REVERTING MY COMMITS IF YOU DON'T FULLY UNDERSTAND
THE PROBLEM !
You just replaced a working code with partial fix, which addresses less
than 30 % of the problem. If you read my comments in ticket #765 more
carefully, you'd realize that the problem is also in invalid relation
between incompatible pointers:
if( i_read < p_buffer[1] + (psz_sdp - psz_initial_sdp ) )
if( psz_sdp - psz_initial_sdp >= i_read - 5 )
With memcopy, they were pointing to the same string - which is OK.
With realloc they are pointing to two completely different strings.
Also the FREE at the end is useless - there are too many locations where
this functions can exit prematurely via return VLC_EGENERIC.
M.
--------------------------------------------------------------------------
---- ----
---- Marian Durkovic network manager ----
---- ----
---- Slovak Technical University Tel: +421 2 524 51 301 ----
---- Computer Centre, Nam. Slobody 17 Fax: +421 2 524 94 351 ----
---- 812 43 Bratislava, Slovak Republic E-mail/sip: md at bts.sk ----
---- ----
--------------------------------------------------------------------------
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list