Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
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
Container registry
Model registry
Monitor
Incidents
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
The Tor Project
Core
Tor
Commits
81a994ce
Commit
81a994ce
authored
10 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Make the assert related to 15083 a tiny bit more tolerant
parent
71ee53fe
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug15083
+5
-1
5 additions, 1 deletion
changes/bug15083
src/or/buffers.c
+8
-1
8 additions, 1 deletion
src/or/buffers.c
with
13 additions
and
2 deletions
changes/bug15083
+
5
−
1
View file @
81a994ce
...
...
@@ -3,4 +3,8 @@
failure if a buffer of exactly the wrong layout was passed
to buf_pullup() at exactly the wrong time. Fixes bug 15083;
bugfix on 0.2.0.10-alpha. Patch from 'cypherpunks'.
- Do not assert if the 'data' pointer on a buffer is advanced to the very
end of the buffer; log a BUG message instead. Only assert if it is
past that point. Fixes bug 15083; bugfix on 0.2.0.10-alpha.
This diff is collapsed.
Click to expand it.
src/or/buffers.c
+
8
−
1
View file @
81a994ce
...
...
@@ -2483,7 +2483,14 @@ assert_buf_ok(buf_t *buf)
total
+=
ch
->
datalen
;
tor_assert
(
ch
->
datalen
<=
ch
->
memlen
);
tor_assert
(
ch
->
data
>=
&
ch
->
mem
[
0
]);
tor_assert
(
ch
->
data
<
&
ch
->
mem
[
0
]
+
ch
->
memlen
);
tor_assert
(
ch
->
data
<=
&
ch
->
mem
[
0
]
+
ch
->
memlen
);
if
(
ch
->
data
==
&
ch
->
mem
[
0
]
+
ch
->
memlen
)
{
static
int
warned
=
0
;
if
(
!
warned
)
{
log_warn
(
LD_BUG
,
"Invariant violation in buf.c related to #15083"
);
warned
=
1
;
}
}
tor_assert
(
ch
->
data
+
ch
->
datalen
<=
&
ch
->
mem
[
0
]
+
ch
->
memlen
);
if
(
!
ch
->
next
)
tor_assert
(
ch
==
buf
->
tail
);
...
...
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