Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
0068b251
Commit
0068b251
authored
Mar 02, 2018
by
Mitchel
Committed by
Wouter van Oortmerssen
Mar 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for Java infinite loop encoding into 0-sized buffer (#4654)
parent
ec74f58b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
FlatBufferBuilder.java
java/com/google/flatbuffers/FlatBufferBuilder.java
+1
-1
No files found.
java/com/google/flatbuffers/FlatBufferBuilder.java
View file @
0068b251
...
...
@@ -196,7 +196,7 @@ public class FlatBufferBuilder {
int
old_buf_size
=
bb
.
capacity
();
if
((
old_buf_size
&
0xC0000000
)
!=
0
)
// Ensure we don't grow beyond what fits in an int.
throw
new
AssertionError
(
"FlatBuffers: cannot grow buffer beyond 2 gigabytes."
);
int
new_buf_size
=
old_buf_size
<<
1
;
int
new_buf_size
=
old_buf_size
==
0
?
1
:
old_buf_size
<<
1
;
bb
.
position
(
0
);
ByteBuffer
nbb
=
bb_factory
.
newByteBuffer
(
new_buf_size
);
nbb
.
position
(
new_buf_size
-
old_buf_size
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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