Commit 34f5271d by Richard Earnshaw Committed by Richard Earnshaw

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
parent 645ca343
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.
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment