aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplex.c
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/cpplex.c
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/cpplex.c')
-rw-r--r--gcc/cpplex.c2
1 files changed, 1 insertions, 1 deletions
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;
}