[MPlayer-dev-eng] [PATCH] vf_delogo: variable rectangle
Nicolas George
nicolas.george at normalesup.org
Wed May 18 13:16:51 CEST 2011
Le nonidi 29 floréal, an CCXIX, Reimar Döffinger a écrit :
> I still dislike the mp_mem all-around: I do not like those hard aborts, I
Maybe you did not look at the latest version: there are no longer hard
aborts but rather clean shutdowns using exit_mplayer().
> do not like adding a new file with "generic" code that will be used only
> in one place (with a risk that this never changes, making it a useless
> maintenance burden)
I agree this is not ideal, but I believe that adding the code to do the
error checks as is in place is much worse: we end up with each place needing
malloc doing things its ways, sometimes with size_t and sometimes with int,
sometimes checking for overflow, sometimes only for failure, and sometimes
for neither, etc.
At least, if the common code is added, new code can be made to use it, and
old code can be progressively converted.
> and I don't really like that the realloc integer
> overflow check is not done in the usual way (nelem > MAX / element_size),
> even though I at least currently can't think of a case where it would
> fail.
I am pretty sure this version is correct, and I quite like the fact that it
works even if SIZE_MAX is missing or wrong or if the type of the variable
changes, but I do not want to create conflict about it, and I will make the
change you want, provided the other points above are resolved.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110518/921bceb3/attachment.asc>
More information about the MPlayer-dev-eng
mailing list