Skip to content

Commit

Permalink
fixed critical bug (double boundary at the end runs daemon in infinit…
Browse files Browse the repository at this point in the history
…e loop)
  • Loading branch information
lmovsesjan committed Mar 14, 2013
1 parent 3b433ee commit 2bda23a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions debian/changelog
@@ -1,3 +1,10 @@
fastcgi-daemon2 (2.10-18) unstable; urgency=low

* fixed critical bug (double boundary at the end runs daemon in
infinite loop)

-- Leonid A. Movsesjan <lmovsesjan@yandex-team.ru> Thu, 14 Mar 2013 20:00:52 +0400

fastcgi-daemon2 (2.10-17) unstable; urgency=low

* Added configurable time format to file logger
Expand Down
4 changes: 3 additions & 1 deletion library/parser.cpp
Expand Up @@ -228,7 +228,9 @@ Parser::parseMultipart(RequestImpl *req, DataBuffer data, const std::string &bou
throw std::runtime_error("malformed multipart message");
}
if (head.size() == 2 && head.startsWith(MINUS_PREFIX_STRING)) {
continue;
if (tail.size() != 3 || !tail.startsWith(MINUS_PREFIX_STRING)) {
continue;
}
}
else if (head.startsWith(RETURN_RN_STRING)) {
head = head.trimn(2, 0);
Expand Down

0 comments on commit 2bda23a

Please sign in to comment.