From: Milan Rusek Date: Mon, 12 Feb 2024 14:26:44 +0000 (+0100) Subject: FBSocket: Fix possible crashes when switching read/write with bflush(). X-Git-Tag: v6.5.16~2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=868c287a45a668a877c950dc13c9effaa055ccd2;p=libucw.git FBSocket: Fix possible crashes when switching read/write with bflush(). --- diff --git a/ucw/fb-socket.c b/ucw/fb-socket.c index 19f27bd5..7ae528cd 100644 --- a/ucw/fb-socket.c +++ b/ucw/fb-socket.c @@ -73,9 +73,9 @@ fbs_spout(struct fastbuf *f) }; int l = f->bptr - f->bstop; - f->bptr = f->bstop; - f->pos += l; char *buf = f->bstop; + f->pos += l; + f->bptr = f->bstop = f->buffer; while (l) {