From: Frank Lahm Date: Sun, 29 Apr 2012 12:01:36 +0000 (+0200) Subject: Fix offset and reqcount check X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=9b6074cd444607507c96c3826b31304ecb5bf84d Fix offset and reqcount check --- diff --git a/etc/afpd/fork.c b/etc/afpd/fork.c index ae537b3b..58eb9b67 100644 --- a/etc/afpd/fork.c +++ b/etc/afpd/fork.c @@ -822,14 +822,13 @@ static int read_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, si if (offset > size) { err = AFPERR_EOF; - + goto afp_read_err; } /* subtract off the offset */ if (reqcount + offset > size) { reqcount = size - offset; err = AFPERR_EOF; - goto afp_read_err; } savereqcount = reqcount;