Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2
rstudio
0010-fix-STL-access-undefined-behaviour.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0010-fix-STL-access-undefined-behaviour.patch of Package rstudio
From 03aace0d96edc298c7c9e4fbfb88574d83493e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= <iucar@fedoraproject.org> Date: Sun, 16 Feb 2020 19:31:47 +0100 Subject: [PATCH 10/11] fix STL access undefined behaviour (cherry picked from commit 42bbb21db66d10e9fd824b812e4f88e9c8cae532) --- src/cpp/session/modules/SessionFiles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/session/modules/SessionFiles.cpp b/src/cpp/session/modules/SessionFiles.cpp index a509c100cf..11c80155a7 100644 --- a/src/cpp/session/modules/SessionFiles.cpp +++ b/src/cpp/session/modules/SessionFiles.cpp @@ -909,13 +909,13 @@ SEXP rs_readLines(SEXP filePathSEXP) return r::sexp::create(contents, &protect); std::vector<std::string> splat = core::algorithm::split(contents, "\n"); - if (splat[splat.size() - 1].empty()) + if (splat.size() && splat[splat.size() - 1].empty()) splat.pop_back(); for (std::size_t i = 0, n = splat.size(); i < n; ++i) { std::string& rElement = splat[i]; - if (rElement[rElement.size() - 1] == '\r') + if (rElement.size() && rElement[rElement.size() - 1] == '\r') rElement.erase(rElement.size() - 1); } -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor