mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-23 19:29:18 +00:00
fix for null deref in slirp soread when the so doesn't have a tcpcb yet
This commit is contained in:
parent
52a36f24bb
commit
68353ca6b1
@ -108,6 +108,10 @@ soread(so)
|
||||
struct sbuf *sb = &so->so_snd;
|
||||
u_int len = sb->sb_datalen - sb->sb_cc;
|
||||
struct iovec iov[2];
|
||||
|
||||
if (!so->so_tcpcb) {
|
||||
so->so_tcpcb = tcp_newtcpcb(so); // but how did we get in this state? should we just default mss for it?
|
||||
}
|
||||
u_int mss = so->so_tcpcb->t_maxseg;
|
||||
|
||||
DEBUG_CALL("soread");
|
||||
|
Loading…
Reference in New Issue
Block a user