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
993e314c
Commit
993e314c
authored
6 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge branch 'maint-0.2.9' into maint-0.3.1
parents
bb35405d
d465bd27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug26007
+5
-0
5 additions, 0 deletions
changes/bug26007
src/or/dirserv.c
+11
-2
11 additions, 2 deletions
src/or/dirserv.c
with
16 additions
and
2 deletions
changes/bug26007
0 → 100644
+
5
−
0
View file @
993e314c
o Major bugfixes (directory authorities, security):
- When directory authorities read a zero-byte bandwidth file, they log
a warning with the contents of an uninitialised buffer. Log a warning
about the empty file instead.
Fixes bug 26007; bugfix on 0.2.2.1-alpha.
This diff is collapsed.
Click to expand it.
src/or/dirserv.c
+
11
−
2
View file @
993e314c
...
...
@@ -2781,14 +2781,23 @@ dirserv_read_measured_bandwidths(const char *from_file,
time_t
file_time
,
now
;
int
ok
;
/* Initialise line, so that we can't possibly run off the end. */
memset
(
line
,
0
,
sizeof
(
line
));
if
(
fp
==
NULL
)
{
log_warn
(
LD_CONFIG
,
"Can't open bandwidth file at configured location: %s"
,
from_file
);
return
-
1
;
}
if
(
!
fgets
(
line
,
sizeof
(
line
),
fp
)
||
!
strlen
(
line
)
||
line
[
strlen
(
line
)
-
1
]
!=
'\n'
)
{
/* If fgets fails, line is either unmodified, or indeterminate. */
if
(
!
fgets
(
line
,
sizeof
(
line
),
fp
))
{
log_warn
(
LD_DIRSERV
,
"Empty bandwidth file"
);
fclose
(
fp
);
return
-
1
;
}
if
(
!
strlen
(
line
)
||
line
[
strlen
(
line
)
-
1
]
!=
'\n'
)
{
log_warn
(
LD_DIRSERV
,
"Long or truncated time in bandwidth file: %s"
,
escaped
(
line
));
fclose
(
fp
);
...
...
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