cpplex.c (_cpp_get_buff): Fix off-by-one error that caused memory leak.
authorRichard Earnshaw <rearnsha@arm.com>
Wed, 17 Oct 2001 16:20:04 +0000 (16:20 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Wed, 17 Oct 2001 16:20:04 +0000 (16:20 +0000)
* cpplex.c (_cpp_get_buff): Fix off-by-one error that caused memory
leak.

From-SVN: r46317

gcc/ChangeLog
gcc/cpplex.c

index 809c20879a0857612cf71900a877a5d754ef68c6..646a9c3cede7d32d3e4ce77b8883396cec50d943 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-17  Richard Earnshaw <rearnsha@arm.com>
+
+       * cpplex.c (_cpp_get_buff): Fix off-by-one error that caused memory
+       leak.
+
 Wed Oct 17 05:26:39 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * Makefile.in (print-rtl.o): Depend on TREE_H.
index 47a5c05a958cb404164b420e1ceb46e032ff4b03..beeb40c9b802c8c0a1ae44504b80039d49c736a1 100644 (file)
@@ -2116,7 +2116,7 @@ _cpp_get_buff (pfile, min_size)
       size = result->limit - result->base;
       /* Return a buffer that's big enough, but don't waste one that's
          way too big.  */
-      if (size >= min_size && size < BUFF_SIZE_UPPER_BOUND (min_size))
+      if (size >= min_size && size <= BUFF_SIZE_UPPER_BOUND (min_size))
        break;
     }