On Wed, Dec 9, 2015 at 9:12 AM Eli Zaretskii <eliz@gnu.org> wrote:
Thanks, but again please show the offending value(s).

'f' was -1.
 
Do I understand correctly that the same code normally works for you,
and only segfaults once in a while?

That's right.