From 4da0e12968b39d0ce9f43c9b0012e6ef0e5129be Mon Sep 17 00:00:00 2001 From: Karl Schimpf Date: Mon, 31 Aug 2015 21:36:14 +0000 Subject: Fix bug in method LLLexer::FP80HexToIntPair llvm-svn: 246489 --- llvm/lib/AsmParser/LLLexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/AsmParser') diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp index 6d62584577a..af7705c5666 100644 --- a/llvm/lib/AsmParser/LLLexer.cpp +++ b/llvm/lib/AsmParser/LLLexer.cpp @@ -105,7 +105,7 @@ void LLLexer::FP80HexToIntPair(const char *Buffer, const char *End, Pair[1] += hexDigitValue(*Buffer); } Pair[0] = 0; - for (int i=0; i<16; i++, Buffer++) { + for (int i = 0; i < 16 && Buffer != End; i++, Buffer++) { Pair[0] *= 16; Pair[0] += hexDigitValue(*Buffer); } -- cgit v1.2.3