cvsps chokes on servers that print more than one "M" response to "version" command
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cvsps (Debian) |
Fix Released
|
Unknown
|
|||
cvsps (Ubuntu) |
Fix Released
|
Medium
|
Brian Murray | ||
Trusty |
Fix Released
|
Undecided
|
Brian Murray | ||
Utopic |
Fix Released
|
Undecided
|
Brian Murray |
Bug Description
[Impact]
If the CVS server prints more than one "M" response line to the "version" command, cvsps (in --cvs-direct mode) prints "cvs_direct: protocol error reading version" and fails to read the repository.
For example, cvsps does not like the following exchange:
Client: version
Server: M Concurrent Versions System (CVS) 1.12.13 (client/server)
Server: M with CVSACL Patch 1.2.5 (cvsacl.
Server: ok
(Note: cvsps has been deprecated upstream in favor of cvs-fast-export, but it is still used by 'git cvsimport'.)
[Test Case]
Download and run the attached test script. The output looks like this if the installed version of cvsps has the bug:
cvs_direct initialized to CVSROOT /foo
cvs_direct: protocol error reading version
ERROR: cvsps does not appear to work with multi-line version strings
and it looks like this if the bug has been fixed:
cvs_direct initialized to CVSROOT /foo
test passed
[Regression Potential]
No immediately obvious risks.
Related branches
- Brian Murray: Approve
-
Diff: 55 lines (+35/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/06-discard-extra-version-lines.patch (+27/-0)
debian/patches/series (+1/-0)
- Ubuntu branches: Pending requested
-
Diff: 1023 lines (+965/-2)7 files modified.pc/06-discard-extra-version-lines.patch/cvs_direct.c (+925/-0)
.pc/applied-patches (+1/-0)
cvs_direct.c (+2/-1)
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/06-discard-extra-version-lines.patch (+27/-0)
debian/patches/series (+1/-0)
- Ubuntu branches: Pending requested
-
Diff: 1023 lines (+965/-2)7 files modified.pc/06-discard-extra-version-lines.patch/cvs_direct.c (+925/-0)
.pc/applied-patches (+1/-0)
cvs_direct.c (+2/-1)
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/06-discard-extra-version-lines.patch (+27/-0)
debian/patches/series (+1/-0)
Changed in cvsps (Debian): | |
status: | Unknown → New |
Changed in cvsps (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: trusty utopic vivid |
tags: |
added: verification-done-utopic verification-needed-trusty removed: verification-needed |
tags: |
added: verification-done verification-done-trusty removed: verification-needed-trusty |
Changed in cvsps (Debian): | |
status: | New → Fix Released |
Attached is a debdiff that includes a patch to fix this bug.