[jp] [PATCH] J-Pilot 0.99.8 and pilot-link 0.12.0-pre4 segfault in delete_pc_record

Chris Bryden cjb at neonbox.org
Wed Nov 23 21:46:36 EST 2005


Hi,

I'm using J-Pilot 0.99.8 With pilot link 0.12.0-pre4 on arm (not sure the
platform is significant), and I was getting segfaults when deleting appointments
and memos. From what I can make out, when pilot-link 0.12 is used the function
delete_pc_record uses pi_buffer_t to as a record buffer. I'm no expert, but it
looks like pi_buffer_free is getting called twice on RecordBuffer, which is
causing the segfault. 

Attached is a patch that cured the problem for me...

Also, I had what I think are endianess problems on arm, for which I adapted a
patch for version 0.98.4 that I found on the web. I'm using j-pilot on a
Zaurus SL-C1000 running pdaXrom to Hotsync with a Fossil WristPDA, and it now
seems to work a treat, thanks! This patch and ipkg packages for j-pilot and
pilot-link can be found at http://www.neonbox.org/zaurus/index.html

HTH,

Chris

diff -urN jpilot-0.99.8.orig/utils.c jpilot-0.99.8/utils.c
--- jpilot-0.99.8.orig/utils.c  2005-10-28 02:17:40.000000000 +0100
+++ jpilot-0.99.8/utils.c       2005-11-23 22:29:15.000000000 +0000
@@ -2046,9 +2046,6 @@
       pi_buffer_free(RecordBuffer);
 #endif /* PILOT_LINK_0_12 */
       fclose(pc_in);
-#ifdef PILOT_LINK_0_12
-      pi_buffer_free(RecordBuffer);
-#endif
       return EXIT_SUCCESS;
       break;
     default:







More information about the Jpilot mailing list