changeset 3412:327bace7e98a

trying yet another fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 08 Jun 2019 20:49:39 +0200
parents 0db4e6c2a89f
children f09bfdea3fc3
files Core/HttpServer/MultipartStreamReader.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Core/HttpServer/MultipartStreamReader.cpp	Sat Jun 08 18:30:03 2019 +0200
+++ b/Core/HttpServer/MultipartStreamReader.cpp	Sat Jun 08 20:49:39 2019 +0200
@@ -196,7 +196,9 @@
         }
       }
 
-	  if (static_cast<ssize_t>(contentLength + 2) > std::distance(headersMatcher_.GetMatchEnd(), corpusEnd))
+      // Explicit conversion to avoid warning about signed vs. unsigned comparison
+      std::iterator_traits<StringMatcher::Iterator>::difference_type d = contentLength + 2;
+      if (d > std::distance(headersMatcher_.GetMatchEnd(), corpusEnd))
       {
         break;  // Not enough data available to have a full part
       }