Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
9d9288f4
Commit
9d9288f4
authored
Oct 14, 2012
by
Philip Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix buffer overrun in git_buf_put_base64
parent
80a6e86b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
src/buffer.c
+1
-1
No files found.
src/buffer.c
View file @
9d9288f4
...
...
@@ -195,7 +195,7 @@ int git_buf_put_base64(git_buf *buf, const char *data, size_t len)
uint8_t
*
write
,
a
,
b
,
c
;
const
uint8_t
*
read
=
(
const
uint8_t
*
)
data
;
ENSURE_SIZE
(
buf
,
buf
->
size
+
((
len
*
4
+
3
)
/
3
)
+
1
);
ENSURE_SIZE
(
buf
,
buf
->
size
+
4
*
((
len
/
3
)
+
!!
extra
)
+
1
);
write
=
(
uint8_t
*
)
&
buf
->
ptr
[
buf
->
size
];
/* convert each run of 3 bytes into 4 output bytes */
...
...
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