[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#86921: DPkg::Tools::Options::cmd::Version processing is broken



Package: apt
Version: 0.5.0
Severity: normal
Tags: patch

>From apt-pkg/deb/dpkgpm.cc:
      // Determine the protocol version
      string OptSec = Opts->Value;
      string::size_type Pos;
      if ((Pos = OptSec.find(' ')) == string::npos || Pos == 0)
         Pos = OptSec.length();
      else
         Pos--;

Those last two lines should be deleted (Pos will be the correct length of the
substring).  Currently, the code eats the last character before the space.

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux mizar 2.4.0 #1 Sat Jan 6 09:34:06 EST 2001 i686

Versions of packages apt depends on:
ii  libc6                        2.2.2-1     GNU C Library: Shared libraries an
ii  libstdc++2.10                1:2.95.2-14 The GNU stdc++ library            

-- 
 - mdz



Reply to: