freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] [freetype2] GSoC-2019-moazin 8887048: Performs basic to s


From: Werner LEMBERG
Subject: Re: [ft-devel] [freetype2] GSoC-2019-moazin 8887048: Performs basic to see if SVG data is valid or not.
Date: Tue, 30 Jul 2019 07:17:02 +0200 (CEST)

> So I guess then the table size checks are probably not useful,
> however, the checks for `numEntries' not being non-zero and an SVG
> document's length not being non-zero are probably needed?  Since, my
> code directly relies on these two.  If `numEntries' is zero, the SVG
> table is pointless.  if an SVG document's length is zero, there is
> no need to process it.  The `version' should be zero.

My philosophy is that valid stuff should be processed as quickly as
possible, and invalid data may take a bit longer to be rejected.  If
you follow that, all the tests you describe are not needed, since the
SVG library will handle those cases by itself, properly rejecting them
as invalid.

> Should these checks stay?  or should I just revert the whole commit?

It looks to me as if reverting is the right action, yes.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]