Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
eae7165c
Commit
eae7165c
authored
Jan 17, 2005
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that we don't compute a block size larger than MAX_BLOCK_SIZE.
parent
54281fe7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
generator.c
generator.c
+13
-10
No files found.
generator.c
View file @
eae7165c
...
...
@@ -146,9 +146,11 @@ static void sum_sizes_sqroot(struct sum_struct *sum, uint64 len)
else
{
int32
c
;
uint64
l
;
for
(
c
=
1
,
l
=
len
;
l
>>=
2
;
c
<<=
1
)
{
assert
(
c
>
0
);
}
int
cnt
;
for
(
c
=
1
,
l
=
len
,
cnt
=
0
;
l
>>=
2
;
c
<<=
1
,
cnt
++
)
{}
if
(
cnt
>=
31
||
c
>=
MAX_BLOCK_SIZE
)
blength
=
MAX_BLOCK_SIZE
;
else
{
blength
=
0
;
do
{
blength
|=
c
;
...
...
@@ -158,6 +160,7 @@ static void sum_sizes_sqroot(struct sum_struct *sum, uint64 len)
}
while
(
c
>=
8
);
/* round to multiple of 8 */
blength
=
MAX
(
blength
,
BLOCK_SIZE
);
}
}
if
(
protocol_version
<
27
)
{
s2length
=
csum_length
;
...
...
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