[Bug 1611133] [NEW] dpkg truncates lines in 'status' file which begin with two spaces.

Dragan S. 1611133 at bugs.launchpad.net
Mon Aug 8 22:24:18 UTC 2016


Public bug reported:

On Ubuntu 12.04.5 LTS command dpkg version 1.16.1.2ubuntu7.7 seems to
experience issues when updating packages.

In one instance the status file seems to have over a thousand lines that
have been truncated. It only seems to truncate package comments that are
indented with two spaces. No indent or single space indent lines are all
fine but lines that have a double space get truncated. They are not gone
in the file they are just replaced by a line that has two spaces and a
new line.


Programmatically I would describe the problem as in perhaps a failure in reading the comment from the source and writing an empty string into the target:

Comment = read_comment(next_line);

fprintf(Status, "  %s\n", Comment);

So if there was an error in read_comment and function returned an empty
string "", this would explain why some lines were getting truncated.

** Affects: dpkg (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/1611133

Title:
  dpkg truncates lines in 'status' file which begin with two spaces.

Status in dpkg package in Ubuntu:
  New

Bug description:
  On Ubuntu 12.04.5 LTS command dpkg version 1.16.1.2ubuntu7.7 seems to
  experience issues when updating packages.

  In one instance the status file seems to have over a thousand lines
  that have been truncated. It only seems to truncate package comments
  that are indented with two spaces. No indent or single space indent
  lines are all fine but lines that have a double space get truncated.
  They are not gone in the file they are just replaced by a line that
  has two spaces and a new line.

  
  Programmatically I would describe the problem as in perhaps a failure in reading the comment from the source and writing an empty string into the target:

  Comment = read_comment(next_line);

  fprintf(Status, "  %s\n", Comment);

  So if there was an error in read_comment and function returned an
  empty string "", this would explain why some lines were getting
  truncated.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1611133/+subscriptions



More information about the foundations-bugs mailing list