Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
bc2cd0ff
Commit
bc2cd0ff
authored
Dec 29, 2015
by
Nick Mathewson
🐻
Browse files
Use timingsafe_memcmp() where available.
See ticket 17944; patch from "logan".
parent
9a901aaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
changes/17944
0 → 100644
View file @
bc2cd0ff
o Minor features (portability):
- Use timingsafe_memcmp() where available. Closes ticket 17944;
patch from "logan".
configure.ac
View file @
bc2cd0ff
...
...
@@ -381,6 +381,7 @@ AC_CHECK_FUNCS(
backtrace_symbols_fd \
clock_gettime \
eventfd \
timingsafe_memcmp \
flock \
ftime \
getaddrinfo \
...
...
src/common/di_ops.c
View file @
bc2cd0ff
...
...
@@ -25,6 +25,9 @@
int
tor_memcmp
(
const
void
*
a
,
const
void
*
b
,
size_t
len
)
{
#ifdef HAVE_TIMINGSAFE_MEMCMP
return
timingsafe_memcmp
(
a
,
b
,
len
);
#else
const
uint8_t
*
x
=
a
;
const
uint8_t
*
y
=
b
;
size_t
i
=
len
;
...
...
@@ -83,6 +86,7 @@ tor_memcmp(const void *a, const void *b, size_t len)
}
return
retval
;
#endif
/* timingsafe_memcmp */
}
/**
...
...
Write
Preview
Supports
Markdown
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