space and tab uncorrectly handled when unfolding

Bug #238119 reported by dforsi
4
Affects Status Importance Assigned to Milestone
libvformat (Debian)
Fix Released
Unknown
libvformat (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

A leading SPACE of a folded line is incorrectly added to the current string and a TAB makes the string end prematurely.

The attached test case prints
1234567890 abcdefghij
while the expected behaviour is
1234567890abcdefghij1234567890

According to paragraph 5.8.1. of RFC 2425 both SPACE and TAB should be ignored:
" A logical line MAY be continued on the next physical line anywhere
   between two characters by inserting a CRLF immediately followed by a
   single white space character (space, ASCII decimal 32, or horizontal
   tab, ASCII decimal 9). At least one character must be present on the
   folded line. Any sequence of CRLF followed immediately by a single
   white space character is ignored (removed) when processing the
   content type."

ProblemType: Bug
Architecture: i386
Date: Sat Jun 7 12:17:18 2008
DistroRelease: Ubuntu 8.04
Package: libvformat1 1.13-4
PackageArchitecture: i386
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=it_IT.UTF-8
SourcePackage: libvformat
Uname: Linux 2.6.24-18-generic i686

Tags: apport-bug
Revision history for this message
dforsi (daniele-forsi) wrote :
Revision history for this message
dforsi (daniele-forsi) wrote :

Patch to ignore SPACE and TAB according to paragraph 5.8.1. of RFC 2425.

Changed in libvformat (Debian):
status: Unknown → New
Changed in libvformat (Debian):
status: New → Fix Committed
Changed in libvformat (Debian):
status: Fix Committed → Fix Released
Changed in libvformat (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.