[versit] Handle malformed concatentations of vCard files
authorChris Adams <chris.adams@jollamobile.com>
Fri, 20 Dec 2013 02:00:45 +0000 (12:00 +1000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 23 Dec 2013 14:58:42 +0000 (15:58 +0100)
commit5275f553721380f6c165bd3f53c79db12fcaad9a
treea3b09b5b82ab52b2810f0f8ebd990ab21bfe0439
parent87b76ba77b48f3de9cbd51cc8d3f2c5289c17e2c
[versit] Handle malformed concatentations of vCard files

If vCard documents which do not end in \r\n are concatenated together,
the result is a malformed vCard document with a line like
END:VCARDBEGIN:VCARD\r\n
in it.  This commit adds logic to the parser to detect those types of
lines and replace them with
END:VCARD\r\nBEGIN:VCARD\r\n
lines.

Signed-off-by: Chris Adams <chris.adams@jollamobile.com>
Change-Id: I9de0bfebaa640fd2a166342e4e310edb76f1cc15
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Renato Araujo Oliveira Filho <renato.filho@canonical.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
src/versit/qversitreader_p.cpp
tests/auto/versit/qversitreader/tst_qversitreader.cpp