From: Craig A. Berry Date: Sat, 14 Jun 2008 00:02:05 +0000 (+0000) Subject: Fix off-by-one error in sanity check in my_fclose wrapper on VMS. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e0951028b5e32cd596309b796a0260b72d79e49d;p=p5sagit%2Fp5-mst-13.2.git Fix off-by-one error in sanity check in my_fclose wrapper on VMS. p4raw-id: //depot/perl@34053 --- diff --git a/vms/vms.c b/vms/vms.c index 363212a..73637e7 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -10374,7 +10374,7 @@ int my_fclose(FILE *fp) { unsigned int fd = fileno(fp); unsigned int fdoff = fd / sizeof(unsigned int); - if (sockflagsize && fdoff <= sockflagsize) + if (sockflagsize && fdoff < sockflagsize) sockflags[fdoff] &= ~(1 << fd % sizeof(unsigned int)); } return fclose(fp);