Skip to content

Commit

Permalink
Fix bugs introduced in syslog merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
wlanmac committed Feb 9, 2015
1 parent e21cc6e commit 44e44bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/chilli.c
Original file line number Diff line number Diff line change
Expand Up @@ -2657,7 +2657,7 @@ int cb_tun_ind(struct tun_t *tun, struct pkt_buffer *pb, int idx) {
* Only the first IP fragment has the UDP header.
*/
if (iphdr_offset((struct pkt_iphdr_t*)ipph) == 0) {
udph = (struct pkt_udphdr_t *)(ipph + hlen);
udph = (struct pkt_udphdr_t *)(((void *)ipph) + hlen);
}
if (ntohs(ipph->tot_len) > len ||
(udph && (ntohs(udph->len) > len))) {
Expand Down Expand Up @@ -4712,7 +4712,7 @@ int cb_radius_auth_conf(struct radius_t *radius,
syslog(LOG_ERR, "Wrong length of MS-CHAP2 success: %d", succattr->l-5);
return dnprot_reject(appconn);
}
memcpy(appconn->ms2succ, (&succattr->v.t)+3, MS2SUCCSIZE);
memcpy(appconn->ms2succ, ((void*)&succattr->v.t)+3, MS2SUCCSIZE);
}
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/main-redir.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ static int redir_cli_write(redir_request *req, uint8_t *d, int l) {
if (w >= 0) {
if (w < l) {
bcatblk(req->dbuf, d + w, l - w);
sylog(LOG_WARNING, "%d buffering %d - %d = %d (%d queued)",
errno, l, w, l-w, req->dbuf->slen);
syslog(LOG_WARNING, "%s: buffering %d - %d = %d (%d queued)",
strerror(errno), l, w, l-w, req->dbuf->slen);
}
}

Expand Down

0 comments on commit 44e44bd

Please sign in to comment.