projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d04a3a
)
Fix undefined behavior (signed integer overflow) when Clang parses a hexfloat with...
author
Richard Smith
<richard-llvm@metafoo.co.uk>
Fri, 24 Aug 2012 00:01:19 +0000
(
00:01
+0000)
committer
Richard Smith
<richard-llvm@metafoo.co.uk>
Fri, 24 Aug 2012 00:01:19 +0000
(
00:01
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162505
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/APFloat.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/APFloat.cpp
b/lib/Support/APFloat.cpp
index ed261a4194c9134e4357c11353280c7ff359e980..f143e6d0adeb353e157fbe6084d716709c4c1916 100644
(file)
--- a/
lib/Support/APFloat.cpp
+++ b/
lib/Support/APFloat.cpp
@@
-196,8
+196,10
@@
totalExponent(StringRef::iterator p, StringRef::iterator end,
assert(value < 10U && "Invalid character in exponent");
unsignedExponent = unsignedExponent * 10 + value;
- if (unsignedExponent > 32767)
+ if (unsignedExponent > 32767)
{
overflow = true;
+ break;
+ }
}
if (exponentAdjustment > 32767 || exponentAdjustment < -32768)