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
97285bc4
Commit
97285bc4
authored
11 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/maint-0.2.4'
parents
3b6c4832
11378173
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/bug9928
+6
-0
6 additions, 0 deletions
changes/bug9928
src/common/util.c
+5
-5
5 additions, 5 deletions
src/common/util.c
with
11 additions
and
5 deletions
changes/bug9928
0 → 100644
+
6
−
0
View file @
97285bc4
o Minor bugfixes:
- Avoid an off-by-one error when checking buffer boundaries when
formatting the exit status of a pluggable transport helper.
This is probably not an exploitable bug, but better safe than
sorry. Fixes bug 9928; bugfix on 0.2.3.18-rc. Bug found by
Pedro Ribeiro.
This diff is collapsed.
Click to expand it.
src/common/util.c
+
5
−
5
View file @
97285bc4
...
...
@@ -3448,10 +3448,10 @@ format_hex_number_sigsafe(unsigned int x, char *buf, int buf_len)
* <b>hex_errno</b>. Called between fork and _exit, so must be signal-handler
* safe.
*
* <b>hex_errno</b> must have at least HEX_ERRNO_SIZE bytes available.
* <b>hex_errno</b> must have at least HEX_ERRNO_SIZE
+1
bytes available.
*
* The format of <b>hex_errno</b> is: "CHILD_STATE/ERRNO\n", left-padded
* with spaces.
Note that there is no trailing \0.
CHILD_STATE indicates where
* with spaces. CHILD_STATE indicates where
* in the processs of starting the child process did the failure occur (see
* CHILD_STATE_* macros for definition), and SAVED_ERRNO is the value of
* errno when the failure occurred.
...
...
@@ -3529,8 +3529,8 @@ format_helper_exit_status(unsigned char child_state, int saved_errno,
left
-=
written
;
cur
+=
written
;
/* Check that we have enough space left for a newline */
if
(
left
<=
0
)
/* Check that we have enough space left for a newline
and a NUL
*/
if
(
left
<=
1
)
goto
err
;
/* Emit the newline and NUL */
...
...
@@ -3786,7 +3786,7 @@ tor_spawn_background(const char *const filename, const char **argv,
this is used for printing out the error message */
unsigned
char
child_state
=
CHILD_STATE_INIT
;
char
hex_errno
[
HEX_ERRNO_SIZE
];
char
hex_errno
[
HEX_ERRNO_SIZE
+
1
];
static
int
max_fd
=
-
1
;
...
...
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