summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f14a3d1)
This is better than proceeding to make tcpsend.used negative.
Should this ever happens, which it doesn't except under AFL, because
of a bug in hfuzzraw.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
adns__tcp_broken(ads,"write",strerror(errno));
r= 0; goto xit;
} else if (r>0) {
adns__tcp_broken(ads,"write",strerror(errno));
r= 0; goto xit;
} else if (r>0) {
+ assert(r <= ads->tcpsend.used);
ads->tcpsend.used -= r;
memmove(ads->tcpsend.buf,ads->tcpsend.buf+r,ads->tcpsend.used);
}
ads->tcpsend.used -= r;
memmove(ads->tcpsend.buf,ads->tcpsend.buf+r,ads->tcpsend.used);
}