Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Josiah Bills
CMake
Commits
04897c02
Commit
04897c02
authored
11 years ago
by
Brad King
Browse files
Options
Downloads
Plain Diff
Merge branch 'sha2-alignment' into release
parents
d9ece45a
75994d95
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/cmCryptoHash.cxx
+3
-3
3 additions, 3 deletions
Source/cmCryptoHash.cxx
with
3 additions
and
3 deletions
Source/cmCryptoHash.cxx
+
3
−
3
View file @
04897c02
...
...
@@ -54,8 +54,8 @@ std::string cmCryptoHash::HashFile(const char* file)
this
->
Initialize
();
// Should be efficient enough on most system:
c
onst
int
bufferSize
=
4096
;
char
buffer
[
buffer
Size
]
;
c
m_sha2_uint64_t
buffer
[
512
]
;
char
*
buffer
_c
=
reinterpret_cast
<
char
*>
(
buffer
)
;
unsigned
char
const
*
buffer_uc
=
reinterpret_cast
<
unsigned
char
const
*>
(
buffer
);
// This copy loop is very sensitive on certain platforms with
...
...
@@ -65,7 +65,7 @@ std::string cmCryptoHash::HashFile(const char* file)
// error occurred. Therefore, the loop should be safe everywhere.
while
(
fin
)
{
fin
.
read
(
buffer
,
buffer
Size
);
fin
.
read
(
buffer
_c
,
sizeof
(
buffer
)
);
if
(
int
gcount
=
static_cast
<
int
>
(
fin
.
gcount
()))
{
this
->
Append
(
buffer_uc
,
gcount
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment