patch for databases/pxtools, BLOBs in pxtools-0.0.20
Kurt Jaeger
pi at c0mplx.org
Thu Dec 28 10:17:11 PST 2006
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 at c0mplx.org +49 171 3101372 14 years to go !
More information about the freebsd-ports
mailing list