[Fontconfig] Did You Know That FT_Done_Face Can Return An Error?

Behdad Esfahbod behdad at behdad.org
Fri May 11 17:59:43 UTC 2018


On Thu, May 10, 2018 at 9:32 PM, Werner LEMBERG <wl at gnu.org> wrote:

>
> > I fully agree with you.  Libraries should not crash **on bad data**.
> > On programmer error and invalid memory state, crashing is safest for
> > avoiding exploits and discovering and fixing bugs.
>
> Well, the stdc version of `free' *does* crash if you try to improperly
> deallocate memory blocks.


So? That's consistent with my statement. Invalid pointers are programmer
error, hence crash.


>   And it returns an error code on programmer
> error (i.e., an invalid `FT_Face' handle).
>

It should assert and crash insteda.


>
>     Werner
>



-- 
behdad
http://behdad.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20180511/3677fade/attachment.html>


More information about the Fontconfig mailing list