Package: ocamldsort Version: 0.14.4-2+b2 Severity: important Tags: patch upstream
The old code in dep_parse.ml only works properly on lines which are terminated by a space; this error has gone unnoticed for years, since ocamldep did produce a trailing space on each dependency line. Recent version of ocamldep do not do this any longer, so the bug is now apparent to anybody using ocamldsort. You can verify this situation yourself by testing as input a file toto.cmo: toto.ml with or without a trailing blank. It is enough to fix the parse_source parser as shown in the attached patch to correct the error. --- dep_parse.ml 2003-08-15 15:57:21.000000000 +0200 +++ ../ocamldsort-0.14.4-fixed/dep_parse.ml 2011-03-31 12:28:17.000000000 +0200 @@ -28,8 +28,8 @@ let rec parse_source = parser | [< '' ' >] -> "" - | [< ''\n' >] -> "" - | [< 'a; d = parse_source >] -> concat a d + | [< 'a when a <> '\n'; d = parse_source >] -> concat a d + | [< >] -> "" let rec parse_sources = parser | [< '' '; d = parse_sources >] -> d -- System Information: Debian Release: 6.0.1 APT prefers stable APT policy: (700, 'stable'), (650, 'testing'), (600, 'unstable'), (550, 'experimental'), (500, 'squeeze-updates') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38-1-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8) Shell: /bin/sh linked to /bin/dash Versions of packages ocamldsort depends on: ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib ocamldsort recommends no packages. ocamldsort suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org