Package: pgdbf
Version: 0.6.2-1.1
Severity: normal

Dear Maintainer,
I've used pgdbf to convert some older FoxPro tables with records in
ancient cp852 encoding. The tables without memo files were converted
well with -s cp852 switch, but those containing memo files failed with a
"A memo record past the end of the memofile was requested" error.
While searching for this error, I've found pgdbf issue
https://github.com/kstrauser/pgdbf/issues/12 containing patch for this
problem. I've tried to rebuild Debian version fo pgdbf with this patch
and the error hadn't appear. Could you please apply the patch (it's in
the current upstream anyway)?
The patch is:
diff --git a/src/pgdbf.c b/src/pgdbf.c
index d4da164..600fc11 100644
--- a/src/pgdbf.c
+++ b/src/pgdbf.c
@@ -712,7 +712,7 @@ int main(int argc, char **argv) {
                         memoblocknumber = 0;
                         s = bufoffset;
                         for(i = 0; i < 10; i++) {
-                            if(*s != 32) {
+                            if(*s && *s != 32) {
                                 /* I'm unaware of any non-ASCII
                                  * implementation of XBase. */
                                 memoblocknumber = memoblocknumber * 10 + *s - 
'0';

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (10, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages pgdbf depends on:
ii  libc6  2.24-9

Versions of packages pgdbf recommends:
ii  postgresql  9.6+179

pgdbf suggests no packages.

-- no debconf information

Reply via email to