]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Refinement for memory corruption bug fix in StdIO_ReadNextLine
authorOliver Kurth <okurth@vmware.com>
Wed, 7 Feb 2018 00:32:40 +0000 (16:32 -0800)
committerOliver Kurth <okurth@vmware.com>
Wed, 7 Feb 2018 00:32:40 +0000 (16:32 -0800)
open-vm-tools/lib/misc/vmstdio.c

index 8c447130dc175b6578881d263812e1634f35422e..5a04d7397db3eed22338df2a979c6d3948beaaf1 100644 (file)
@@ -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;
       }