Date: Thu, 28 Dec 2006 18:49:11 +0100 From: Kurt Jaeger <pi@c0mplx.org> To: jan@kneschke.de Cc: ports@FreeBSD.org, krion@freebsd.org Subject: patch for databases/pxtools, BLOBs in pxtools-0.0.20 Message-ID: <20061228174911.GL23423@home.c0mplx.org>
next in thread | raw e-mail | index | archive | help
Hi! I've had a paradox database to convert and found some issue with BLOBs: If a file defines BLOBs, but the BLOBs do not contain data, the PXBLOBtoBinary does not correctly defines s and s_size and then binary_to_sql() fails. It can be fixed with the following patch. Hope this helps. ------------------------------------- diff -u pxconvert.c.orig pxconvert.c --- pxconvert.c.orig Thu Dec 28 18:40:39 2006 +++ pxconvert.c Thu Dec 28 18:37:29 2006 @@ -513,7 +513,11 @@ #ifdef DEBUG fprintf(stderr, "[BLOB] offset: %08lx, length: %08lx, mod_number: %04x, index: %02x\n", offset, length, mod_number, index); #endif - if (index == 0x00) return 0; + if (index == 0x00) { + *binsize = 0; + *binstorage = NULL; + return 0; + } if (!blobname) { fprintf(stderr, "[BLOB] offset: %08lx, length: %08lx, mod_number: %04x, index: %02x - do I need a BLOB-filename '-b ...' ?\n", offset, length, mod_number, index); ------------------------------------- -- pi@c0mplx.org +49 171 3101372 14 years to go !
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061228174911.GL23423>