[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Updates for GF driver.
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Updates for GF driver. |
Date: |
Thu, 07 Jun 2018 18:34:28 +0200 (CEST) |
>>> * Robustness: Please have always in mind that malformed GF files
>>> must be either sanitized or properly rejected. Not sure whether
>>> this is an issue, but GF commands like `paint3' can handle quite
>>> large values...
>>
>
> I have already added checks for `post_post` instruction which checks
> for GF_ID and returns `Invalid_File_Format` if not found so, and
> some more checks which checks for GF files' validity in
> `gf_load_font`. Similar to what done in Vflib. Do you suggest
> anything more?
I don't know yet. I would have to study the GF format in detail to
find out such issues – I forward this to you :-)
>>> * There is no code yet in `gf_load_font' to recognize the GF
>>> format (returning `not a GF font' otherwise).
>
> Isn't this same as done above, for `Invalid_File_Format`?
No, it's not. If the format is not recognized, this is, the GF driver
has decided that the font in question is not a GF font, the driver
should return `Unknown_File_Format'.
Later on, if the GF drvier has come to the decision: `Yes, this is
definitely a GF font', all problems that can't be sanitized should
lead to `Invalid_File_Format' (or one of the more specific error
codes).
Werner