Skip to content

Commit

Permalink
Fix session cache misses and failed unit tests on MIPS
Browse files Browse the repository at this point in the history
  • Loading branch information
droe committed Jan 16, 2018
1 parent a631f81 commit f7e5c08
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

### SSLsplit develop

- Fix session cache misses and failed unit tests on MIPS by fixing undefined
behaviour in session cache hash functions (Debian #848919 and #851271).
- Synthesize MAC addresses to avoid the requirement for root privileges and
waiting for ARP timeouts on some platforms in log2pcap.py (issue #169).
- Add -M for writing an SSLKEYLOGFILE compatible log file (issue #184).
Expand Down
4 changes: 1 addition & 3 deletions cachedsess.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,11 @@ static inline khint_t
kh_dynbuf_hash_func(dynbuf_t *b)
{
khint_t *p = (khint_t *)b->buf;
khint_t h;
khint_t h = 0;
int rem;

if ((rem = b->sz % sizeof(khint_t))) {
memcpy(&h, b->buf + b->sz - rem, rem);
} else {
h = 0;
}

while (p < (khint_t*)(b->buf + b->sz - rem)) {
Expand Down
4 changes: 1 addition & 3 deletions cachessess.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ static inline khint_t
kh_dynbuf_hash_func(dynbuf_t *b)
{
khint_t *p = (khint_t *)b->buf;
khint_t h;
khint_t h = 0;
int rem;

if ((rem = b->sz % sizeof(khint_t))) {
memcpy(&h, b->buf + b->sz - rem, rem);
} else {
h = 0;
}

while (p < (khint_t*)(b->buf + b->sz - rem)) {
Expand Down

0 comments on commit f7e5c08

Please sign in to comment.