Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Benjamin J. Thompson
Tor
Commits
d0525c38
Commit
d0525c38
authored
6 years ago
by
rl1987
Committed by
Nick Mathewson
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Refrain from potentially insecure usage of strncat()
parent
a9628c0c
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/bug26522
+6
-0
6 additions, 0 deletions
changes/bug26522
src/lib/err/backtrace.c
+3
-6
3 additions, 6 deletions
src/lib/err/backtrace.c
with
9 additions
and
6 deletions
changes/bug26522
0 → 100644
+
6
−
0
View file @
d0525c38
o Minor bugfixes (security):
- Refrain from potentially insecure usage of strncat() in
configure_backtrace_handler(). Use snprintf() instead.
Fixes bug 26522; bugfix on
a969ce464dc23db39725a891d60537f3d3e51b50 (not in any tor
release).
This diff is collapsed.
Click to expand it.
src/lib/err/backtrace.c
+
3
−
6
View file @
d0525c38
...
...
@@ -35,6 +35,7 @@
#include
<errno.h>
#include
<stdlib.h>
#include
<string.h>
#include
<stdio.h>
#ifdef HAVE_CYGWIN_SIGNAL_H
#include
<cygwin/signal.h>
...
...
@@ -264,16 +265,12 @@ dump_stack_symbols_to_error_fds(void)
int
configure_backtrace_handler
(
const
char
*
tor_version
)
{
char
version
[
128
];
strncpy
(
version
,
"Tor"
,
sizeof
(
version
)
-
1
);
char
version
[
128
]
=
"Tor
\0
"
;
if
(
tor_version
)
{
strncat
(
version
,
" "
,
sizeof
(
version
)
-
1
);
strncat
(
version
,
tor_version
,
sizeof
(
version
)
-
1
);
snprintf
(
version
,
sizeof
(
version
),
"Tor %s"
,
tor_version
);
}
version
[
sizeof
(
version
)
-
1
]
=
0
;
return
install_bt_handler
(
version
);
}
...
...
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