Memory corruption because of incorrect call to g_stat()
Another segfault occuerd at file_export_response_callback
when g_object_ref (dia->data)
called. This is because dia
pointer at this moment is NULL
. Further debug revealed that pointer corrupts after call to g_stat()
.
At my machine (Win7 64bit, msys2, glib 2.65.0) there is mismatch in size of struct stat
and GStatBuf
: first is 48 and last is 56. So looks like useing of GStatBuf
is more correct (see gtk issue).
This fixed in merge request !80 (and feeding non-utf8 streeng to g_stat()
in file_export_response_callback
too).