diff options
-rw-r--r-- | pkt.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -72,7 +72,7 @@ static inline uint8_t *pkt_put(struct pkt *p, size_t len) assert(pkt_invariant(p)); - if (len <= pkt_len(p)) { + if (pkt_len(p) + len <= p->size) { data = p->tail; p->tail += len; } else { |