Package: file
Version: 4.23-2
Severity: normal

After a pstring, relative offsets have an off-by-one error:

$ cat magic
0    ubelong <256
>3   pstring x    "%s"
>>&0 ubelong x    %x
$ hd testfile
00000000  00 00 00 04 6e 61 6d 65  12 34 56 78              |....name.4Vx|
0000000c
$ file -m magic testfile
testfile: "name" 65123456

The number should contain 12345678, not 65123456.  The 65 comes from
the 'e' in "name", the last character in the pstring.

- Josh Triplett

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages file depends on:
ii  libc6                         2.7-8      GNU C Library: Shared libraries
ii  libmagic1                     4.23-2     File type determination library us

file recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to