Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
feb11e4a
Commit
feb11e4a
authored
Dec 20, 2017
by
mattijs
Browse files
BUG: UIPstream: sending zero sized string accesses beyond buffer. Fixes
#676
parent
276cef6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.C
View file @
feb11e4a
...
...
@@ -106,7 +106,14 @@ inline Foam::Istream& Foam::UIPstream::readStringFromBuffer(std::string& str)
size_t
len
;
readFromBuffer
(
len
);
str
.
assign
(
&
externalBuf_
[
externalBufPosition_
],
len
);
if
(
len
==
0
)
{
str
.
clear
();
}
else
{
str
.
assign
(
&
externalBuf_
[
externalBufPosition_
],
len
);
}
externalBufPosition_
+=
len
;
checkEof
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment