Reply To: Crash with long file names

#15715
Anonymous
Inactive

Well this took several hours to track down!

First of all I thought it might have been unclean data, then bad data in database (since the last record in the DB is the long filename for me).

_Finally_ tracked it down.

rsp.c calls pi_log which in turn calls util_vasprintf in util.c util_vasprintf has an intitial buffer size of 200, but it does do resizing as per vsnprintf(2). Well _almost_….

In my version (Debian) HAVE_VA_COPY was not set and so util.c does a memcpy of two va_lists. This is what causes the problem.

If I set HAVE_VA_COPY to true, it all works beautifully!

I’ll be submitting a patch to Debian for this (so it should also make it into ubuntu). I don’t know why configure isn’t setting it though…