aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2001-10-17 16:20:04 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2001-10-17 16:20:04 +0000
commit34f5271ddd1743246b9746d4b3f338f5cffa7982 (patch)
tree354d273d223a8a7f6324482e0685f83a71189d6d /gcc
parent645ca3439054793e5a25d885ead37d67848fd28f (diff)
downloadgcc-34f5271ddd1743246b9746d4b3f338f5cffa7982.zip
gcc-34f5271ddd1743246b9746d4b3f338f5cffa7982.tar.gz
gcc-34f5271ddd1743246b9746d4b3f338f5cffa7982.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cpplex.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 809c208..646a9c3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/cpplex.c b/gcc/cpplex.c
index 47a5c05..beeb40c 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;
}