cpplex.c (_cpp_get_buff): Fix off-by-one error that caused memory leak.

* cpplex.c (_cpp_get_buff): Fix off-by-one error that caused memory
leak.

From-SVN: r46317
This commit is contained in:
Richard Earnshaw 2001-10-17 16:20:04 +00:00 committed by Richard Earnshaw
parent 645ca34390
commit 34f5271ddd
2 changed files with 6 additions and 1 deletions

View 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.

View 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;
}