[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Possible SEGV problem in aflatin.c
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Possible SEGV problem in aflatin.c |
Date: |
Fri, 11 May 2018 19:47:56 +0200 (CEST) |
> I have tested the patch and fallen over a related problem. Given
> that shaper_buf is no longer allocated, it also no longer needs to
> be freed. This can be remedied by using :-
>
> #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
> af_shaper_buf_destroy( face, shaper_buf );
> #endif
This is not necessary. In the case of !FT_CONFIG_OPTION_USE_HARFBUZZ,
`af_shaper_buf_destroy' is a no-op.
> Also, depending on how you feel about exiting as quickly as possible
> after an error, the while loops could be updated to finish as soon
> as an error is detected to avoid needlessly looping around the code.
Usually, we don't optimize in case of error, but perhaps you want to
provide a patch :-)
Werner