diff options
Diffstat (limited to 'tun.c')
-rw-r--r-- | tun.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -2033,7 +2033,12 @@ tun_finalize ( } if (buf) - buf->len = ret; + { + if (ret < 0) + buf->len = 0; + else + buf->len = ret; + } return ret; } |