From f59906cc90c2a670de7b75318d09cfe5817c5b99 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 14 Jan 2020 09:46:12 +0100 Subject: [PATCH] Removed pop_back that could lead to undefined behaviour --- client_http.hpp | 1 - server_http.hpp | 1 - 2 files changed, 2 deletions(-) diff --git a/client_http.hpp b/client_http.hpp index 11ad753..bb7bcb2 100644 --- a/client_http.hpp +++ b/client_http.hpp @@ -656,7 +656,6 @@ namespace SimpleWeb { std::string line; getline(istream, line); bytes_transferred -= line.size() + 1; - line.pop_back(); unsigned long length = 0; try { length = stoul(line, 0, 16); diff --git a/server_http.hpp b/server_http.hpp index 718a6b7..18de816 100644 --- a/server_http.hpp +++ b/server_http.hpp @@ -634,7 +634,6 @@ namespace SimpleWeb { std::string line; getline(istream, line); bytes_transferred -= line.size() + 1; - line.pop_back(); unsigned long length = 0; try { length = stoul(line, 0, 16);