From: Oliver Kurth Date: Wed, 7 Feb 2018 00:32:40 +0000 (-0800) Subject: Refinement for memory corruption bug fix in StdIO_ReadNextLine X-Git-Tag: stable-10.3.0~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff754c8a99bffe92b07c933898c7d9d20c02873f;p=thirdparty%2Fopen-vm-tools.git Refinement for memory corruption bug fix in StdIO_ReadNextLine --- diff --git a/open-vm-tools/lib/misc/vmstdio.c b/open-vm-tools/lib/misc/vmstdio.c index 8c447130d..5a04d7397 100644 --- a/open-vm-tools/lib/misc/vmstdio.c +++ b/open-vm-tools/lib/misc/vmstdio.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2017 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2018 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -227,7 +227,7 @@ StdIO_ReadNextLine(FILE *stream, // IN: size += nr; DynBuf_SetSize(&b, size); - if (maxBufLength != 0 && size > maxBufLength) { + if (maxBufLength != 0 && size >= maxBufLength) { errno = E2BIG; goto error; }