>
> Behdad is right. Don't test stuff that FreeType doesn't need for
> itself. In other words, only test data that FreeType itself is going
> to access. For example, if we need the 12th byte of structure `foo',
> then we should check whether we can do that, together with some sanity
> tests to
> 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.
> Well one thing that just came to my mind is that though these checks
> aren't problematic, I am not sure how useful they are from a
> practical point of view. If somebody had to get invalid tables
> passed in, there can be many ways to do that and its impossible and
> also pointless to check
Why?
On Mon, Jul 29, 2019 at 12:41 PM Moazin Khatti
wrote:
> branch: GSoC-2019-moazin
> commit 8887048557db93857ffa6169cfe4c3190f9cb1a1
> Author: Moazin Khatti
> Commit: Moazin Khatti
>
> Performs basic to see if SVG data is valid or not.
> ---
> src/sfnt/ttsvg.c | 38
I see similar checks in `ttcpal.c' and many other places.
Invalid data is checked for and rejected, so decided to do
the same.
On Tue, Jul 30, 2019 at 12:59 AM Behdad Esfahbod wrote:
> Why?
>
> On Mon, Jul 29, 2019 at 12:41 PM Moazin Khatti
> wrote:
>
>> branch: GSoC-2019-moazin
>> commit
Don't.
Don't check things your code doesn't rely on. That just bloats code and
makes assumptions that just end up being wrong and make others' life harder
in the future.
On Mon, Jul 29, 2019 at 1:02 PM Moazin Khatri
wrote:
> I see similar checks in `ttcpal.c' and many other places.
> Invalid
>
> Don't.
>
> Don't check things your code doesn't rely on. That just bloats code and
> makes assumptions that just end up being wrong and make others' life harder
> in the future.
>
Well, my code does rely on the OT-SVG specs and the
conditions I check for come directly from the specs too.
If
Well one thing that just came to my mind is that though
these checks aren't problematic, I am not sure how
useful they are from a practical point of view. If somebody
had to get invalid tables passed in, there can be many ways
to do that and its impossible and also pointless to check
for all of