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

Bug#539442: marked as done (libvformat1: space and tab uncorrectly handled when unfolding)

Your message dated Mon, 24 May 2010 11:22:47 +0000
with message-id <E1OGVk7-0004fJ-Fr@ries.debian.org>
and subject line Bug#539442: fixed in libvformat 1.13-6
has caused the Debian Bug report #539442,
regarding libvformat1: space and tab uncorrectly handled when unfolding
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

539442: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=539442
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libvformat1
Version: 1.13-4
Severity: normal
Tags: patch

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

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."

-- System Information:
Debian Release: 5.0
  APT prefers jaunty-updates
  APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 'jaunty')
Architecture: i386 (i686)

Kernel: Linux 2.6.28-14-generic (SMP w/1 CPU core)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
/* compile with: gcc unfold.c -o unfold -lvformat */

#include <stdio.h>
#include <string.h>
#include <vf_iface.h>

int main(int argc, char *argv[]) {
	VF_PARSER_T *parser;
	VF_OBJECT_T *object;
	VF_PROP_T *prop;
	char *vcard = \
"VERSION:3.0\n" \
"FN:Test vCard\n" \
"N:Test vCard\n" \
"NOTE:1234567890\n" \
" abcdefghij\n" \
"\t1234567890\n" \
	char *prop_value;

	if (vf_parse_init(&parser, &object)) {
		vf_parse_text(parser, vcard, strlen(vcard));

		if (vf_get_property(&prop, object, VFGP_FIND, NULL, VFP_NOTE, NULL)) {
			prop_value = vf_get_prop_value_string(prop, 0);
			if (prop_value) {
				printf("%s\n", prop_value);
		vf_delete_object(object, 0);
--- src/vf_parser.c.orig	2008-06-07 12:33:53.000000000 +0200
+++ src/vf_parser.c	2008-06-07 14:36:30.000000000 +0200
@@ -333,9 +333,9 @@
                     /* Ignore */
-                if (SPACE == c)
+                if ((SPACE == c) || (TAB == c))
-                    ok = append_to_curr_string(&(p_parse->prop.value.v.s), NULL, &c, 1);
+                    /* Ignore leading white space characters when unfolding */
                     p_parse->state = _VF_STATE_RFC822VALUE;

--- End Message ---
--- Begin Message ---
Source: libvformat
Source-Version: 1.13-6

We believe that the bug you reported is fixed in the latest version of
libvformat, which is due to be installed in the Debian FTP archive:

  to main/libv/libvformat/libvformat-dev_1.13-6_amd64.deb
  to main/libv/libvformat/libvformat0_1.13-6_amd64.deb
  to main/libv/libvformat/libvformat1-dev_1.13-6_amd64.deb
  to main/libv/libvformat/libvformat1_1.13-6_amd64.deb
  to main/libv/libvformat/libvformat_1.13-6.debian.tar.gz
  to main/libv/libvformat/libvformat_1.13-6.dsc

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 539442@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Thomas Preud'homme <robotux@celest.fr> (supplier of updated libvformat package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA256

Format: 1.8
Date: Wed, 12 May 2010 19:17:34 +0200
Source: libvformat
Binary: libvformat-dev libvformat0 libvformat1-dev libvformat1
Architecture: source amd64
Version: 1.13-6
Distribution: unstable
Urgency: low
Maintainer: Thomas Preud'homme <robotux@celest.fr>
Changed-By: Thomas Preud'homme <robotux@celest.fr>
 libvformat-dev - library to read and write vcard files (development files)
 libvformat0 - library to read and write vcard files
 libvformat1 - dummy transitional package for libvformat1 -> libvformat0
 libvformat1-dev - dummy transitional package for libvformat1-dev -> libvformat-dev
Closes: 448002 535686 539442
 libvformat (1.13-6) unstable; urgency=low
   [ Thomas Preud'homme ]
   * New maintainer. (Closes: #535686)
   * Bug fixes:
     + Remove leading space when unfolding. (Closes: #539442 thanks to Daniele
     + Correct the use of va_arg functions in the tests to make it work on all
   * debian/control:
     + Rename libvformat1 into libvformat0 to match soname. (Closes: #448002)
     + Rename libvformat1-dev into libvformat-dev as only one version is
     + Bump Standard-Version from 3.8.3 to 3.8.4 (no changes needed).
     + Add Vcs-Browser and Vcs-Git fiels.
   * debian/source/format:
     + Switch to dpkg-source 3.0 (quilt) format.
   * debian/compat:
     + Bump debhelper compatibility from 5 to 7.
   * Add a lintian override for ltmain.sh.
 aef578e2f0e675cffaa99a2602b8ed77e1ca0f14 1620 libvformat_1.13-6.dsc
 ffaea6958e23ef16b2005a5bad583b8e693ab6e5 23210 libvformat_1.13-6.debian.tar.gz
 f77c44b982f934348a6fa9f6e933fda5436405b4 58216 libvformat-dev_1.13-6_amd64.deb
 f061046ec178686bc89e8b0b925b3d4b39d8f7f4 16624 libvformat0_1.13-6_amd64.deb
 cb622d78ac7efb637434a24b85ad06db3f593ca7 3664 libvformat1-dev_1.13-6_amd64.deb
 617113bfca79d69ecab44d8b9d33381c5b5ae04a 3662 libvformat1_1.13-6_amd64.deb
 16ac41a4c3232dd1d91957cf58c6280ecd55ef45cc464aeb254e55676b2c4cb5 1620 libvformat_1.13-6.dsc
 482ffcc3c460e9b78d450501410805b00dfd99793cf0774b6fa625a419f3f883 23210 libvformat_1.13-6.debian.tar.gz
 a3b68fefa37d91c0090853983f03575665c6a214ff3e4e4b26414eb5553defcb 58216 libvformat-dev_1.13-6_amd64.deb
 f5c8d6b13c504643628cf77a1960b34c127877134c82b6480be4164e72d0c37c 16624 libvformat0_1.13-6_amd64.deb
 e6fb9d55bfe8f5d835e9add5e2f8824ffe8ced8771cab423688733af1e007552 3664 libvformat1-dev_1.13-6_amd64.deb
 61a8884ce45713fbce3ec92b87eacda741787f6a9053bdc36a062a4b02ed1e9b 3662 libvformat1_1.13-6_amd64.deb
 13842386d5c378439bee2f3104e5a378 1620 devel optional libvformat_1.13-6.dsc
 d6e88fbcb797f6634e3b0a53ab69f2dd 23210 devel optional libvformat_1.13-6.debian.tar.gz
 8c8dab74fe5a54a27ff2d2b6a82f167b 58216 libdevel optional libvformat-dev_1.13-6_amd64.deb
 d592834e69f31075abe5055b3d55eb31 16624 libs optional libvformat0_1.13-6_amd64.deb
 1ebbe995745546cf371a9828c6775da4 3664 oldlibs extra libvformat1-dev_1.13-6_amd64.deb
 8452c335149defc11ae6f24ab01d0f8d 3662 oldlibs extra libvformat1_1.13-6_amd64.deb

Version: GnuPG v1.4.10 (GNU/Linux)


--- End Message ---

Reply to: