Commit b79864ae authored by Joao Gramacho's avatar Joao Gramacho

Bug#16997513 MY_STRTOLL10 ACCEPTING OVERFLOWED UNSIGNED LONG LONG VALUES AS NORMAL ONES

Merge from mysql-5.1 into mysql-5.5
parents 8412ac00 e5a1966b
...@@ -193,8 +193,8 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error) ...@@ -193,8 +193,8 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error)
goto overflow; goto overflow;
/* Check that we didn't get an overflow with the last digit */ /* Check that we didn't get an overflow with the last digit */
if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) && if (i > cutoff || (i == cutoff && (j > cutoff2 || (j == cutoff2 &&
k > cutoff3))) k > cutoff3))))
goto overflow; goto overflow;
li=i*LFACTOR2+ (ulonglong) j*100 + k; li=i*LFACTOR2+ (ulonglong) j*100 + k;
return (longlong) li; return (longlong) li;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment