aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFengwei Yin <fengwei.yin@intel.com>2013-05-22 12:35:34 +0800
committeryijunx.zhu <yijunx.zhu@intel.com>2014-04-08 15:09:34 +0800
commita6df82320fcb8f26af0d067c7768fedbaeb9ad88 (patch)
treec07bb44e21f5839d4f89e538496c858710b53c90
parent6f6b22e921d47ab5a6625199f609d2bbfb409061 (diff)
downloadstlport-a6df82320fcb8f26af0d067c7768fedbaeb9ad88.tar.gz
stlport: Fix boundary condition in stlport for __get_integer.
The __get_integer doesn't trigger -min for signed (int, long, long long) as overflow. Change-Id: Iba8f594fd7c2f404aa14367c9201b8b116cd36fc Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
-rw-r--r--stlport/stl/_num_get.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/stlport/stl/_num_get.c b/stlport/stl/_num_get.c
index 1e7d234..e814879 100644
--- a/stlport/stl/_num_get.c
+++ b/stlport/stl/_num_get.c
@@ -155,6 +155,9 @@ __get_integer(_InputIter& __first, _InputIter& __last,
}
}
+ if ((__result == (numeric_limits<_Integer>::min)()) && !__is_negative)
+ __ovflow = true;
+
if (__is_group && __group_sizes_end != __group_sizes) {
*__group_sizes_end++ = __current_group_size;
}