Skip Menu |
 

This queue is for tickets about the Xbase CPAN distribution.

Report information
The Basics
Id: 105004
Status: new
Priority: 0/
Queue: Xbase

People
Owner: Nobody in particular
Requestors: frank_mckenney [...] mindspring.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments


MIME-Version: 1.0
X-Spam-Status: No, score=-2 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham
X-Mailer: Claws Mail 3.8.0 (GTK+ 2.20.1; i486-pc-linux-gnu)
X-Spam-Flag: NO
X-Virus-Checked: Checked
Content-Type: multipart/mixed; boundary="MP_/D6V9hF.gDzcDddx5GTJyq2r"
Message-ID: <20150605143858.5f47c167 [...] bagheera>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Organization: McKenney Associates
X-Spam-Score: -2
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id EC255240446 for <cpan-bug+Xbase [...] hipster.bestpractical.com>; Fri, 5 Jun 2015 14:39:15 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F7N5bVBDEAbn for <cpan-bug+Xbase [...] hipster.bestpractical.com>; Fri, 5 Jun 2015 14:39:13 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 6169D24043B for <bug-Xbase [...] rt.cpan.org>; Fri, 5 Jun 2015 14:39:12 -0400 (EDT)
Received: (qmail 27107 invoked by alias); 5 Jun 2015 18:39:11 -0000
Received: from elasmtp-mealy.atl.sa.earthlink.net (HELO elasmtp-mealy.atl.sa.earthlink.net) (209.86.89.69) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 05 Jun 2015 11:39:03 -0700
Received: from [72.84.229.253] (helo=bagheera) by elasmtp-mealy.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from <frank_mckenney [...] mindspring.com>) id 1Z0wWA-0003BC-VA for bug-Xbase [...] rt.cpan.org; Fri, 05 Jun 2015 14:38:59 -0400
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=frank_mckenney [...] mindspring.com
X-Elnk-Trace: 49603c1f2cd7a6842e796ac9b3da57895e89bb4777695bebf819fbbbb0a0288468e9da6efff65ce8f0df3037909dd82e350badd9bab72f9c350badd9bab72f9c
Delivered-To: cpan-bug+Xbase [...] hipster.bestpractical.com
Subject: Xbase-1.07: FPT file handling problem
Return-Path: <frank_mckenney [...] mindspring.com>
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=mindspring.com; b=S/wnRD5TbgXIrSaIgHoFqAMkMxqMHyG/EYuUYlz4wjvy2WHpbrTBoVQYHkfHJH2v; h=Received:Date:From:To:Subject:Message-ID:Organization:X-Mailer:Mime-Version:Content-Type:X-ELNK-Trace:X-Originating-IP;
X-RT-Mail-Extension: xbase
X-Original-To: cpan-bug+Xbase [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Fri, 5 Jun 2015 14:38:58 -0400
X-Spam-Level:
X-Originating-Ip: 72.84.229.253
To: bug-Xbase [...] rt.cpan.org
From: Frank McKenney <frank_mckenney [...] mindspring.com>
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ascii
Content-Length: 3698
Download (untitled) / with headers
text/plain 3.6k
Module: Xbase-1.07 (1996) Perl: This is perl 5, version 12, subversion 3 (v5.12.3) built for i486-linux-thread-multi OS: Linux amun 3.2.63-grsec #1 SMP Fri Oct 24 13:43:09 PDT 2014 i686 AMD Athlon(tm) II X2 250 Processor AuthenticAMD GNU/Linux There is a bug in the section of Xbase.pm v1.07 that handles the FPT files used by FoxBase, etc. to store MEMO fields. Using Xbase v1.07, if the MEMO file is set up with a BLOCKSIZE greater than 255 (the default is 64), or if non-zero data is present in certain officially unused portions of the FPT file header, attempts to retrieve the contents of MEMO fields will fail or return invalid results. This appears to be the result of a combination of "guessing" where the offset and BLOCKSIZE values were being stored in the header and assuming Intel (little endian) values rather the correct Motorola (big endian) values. A diff file that, if applied to a v1.07 Xbase.pm file (1996), will fix this problem is attached. ( Since I don't know if e-mail bug submission allows attachments, I've also appended the contents of the -- short -- file below. ) Hope this helps someone else. Frank McKenney -- To be a first-rate scientist it is not necessary (and certainly not sufficient) to be extremely clever, anyhow in a pyrotechnic sense. One of the great social revolutions brought about by scientific research has been the democratization of learning. Anyone who combines strong common sense with an ordinary degree of imaginativeness can become a creative scientist, and a happy one besides, in so far as happiness depends upon being able to develop to the limit of one's abilities. -- Peter Medawar, "Lucky Jim" 1968 -- Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney aatt mindspring ddoott com -------------------------------------------------------- 0a1,37 Show quoted text
> #------------------- > # > # 2015-05-19 FAMcK > # > # Corrected several MEMO file (FPT) errors discovered while working > # with the Harbour Project compiler (Clipper replacement): > # > # 1) FPT "BLOCKSIZE" is a 16-bit BIG-endian value contained in > # bytes 6-7 of the header of the associated DBF file. > # Old code only worked due to the default BLOCKSIZE of 64 > # fitting into one byte and the presence of trailing zeroes > # in bytes 8-10 of most (but not all) FPT files. > # > # However, this would have failed with any FPT file with a > # BLOCKSIZE > 255. > # > # 2) A MEMO block pointer of " 0" apparently indicates > # an empty value (""). It definitely -- does not -- mean seek > # to offset 0 of the FPT file. <grin> > # > # Note: The code used to obtain 'fpt_nextf', the next-free-block > # pointer, also uses unpack("V") on a BIG-endian field, but > # this does not cause any problems because that value is > # never used. As the Xbase-1.07 Abstract says, this code > # is intended only for reading. > # > # Frank McKenney, McKenney Associates > # > # References: > # > # Microsoft FoxPro Memo File Structure (.FPT) > # https://msdn.microsoft.com/en-us/library/8599s21w.aspx > # > # Xbase File Format Description > # http://www.clicketyclick.dk/databases/xbase/format/index.html > # > #-------------------
149c186 < $self->{'fpt_blksize'}=unpack("l",pack("L",unpack("V",substr($fpth,7,4)))); --- Show quoted text
> $self->{'fpt_blksize'}=unpack("l",pack("L",unpack("n",substr($fpth,6,2)))); # 7,4 -> 6,2 FAMcK
467a505 Show quoted text
> return "" if $memblk == 0; # Empty MEMO field, don't seek. FAMcK
--------------------------------------------------------
Content-Type: text/x-patch
Content-Disposition: attachment; filename="xbase-1.07-fix-for-FPT-2015-06-15.diff"
Content-Transfer-Encoding: 7bit
Content-Length: 1715

Message body is not shown because sender requested not to inline it.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.