From: Richard Earnshaw Date: Wed, 17 Oct 2001 16:20:04 +0000 (+0000) Subject: cpplex.c (_cpp_get_buff): Fix off-by-one error that caused memory leak. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34f5271ddd1743246b9746d4b3f338f5cffa7982;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 809c20879a0..646a9c3cede 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-10-17 Richard Earnshaw + + * cpplex.c (_cpp_get_buff): Fix off-by-one error that caused memory + leak. + Wed Oct 17 05:26:39 2001 Richard Kenner * Makefile.in (print-rtl.o): Depend on TREE_H. diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 47a5c05a958..beeb40c9b80 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -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; }