summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorkent@mysql.com/kent-amd64.(none) <>2007-09-28 22:35:48 +0200
committerkent@mysql.com/kent-amd64.(none) <>2007-09-28 22:35:48 +0200
commit33ad13280c22e0d5b1ba6bd6ceb920f49a678d95 (patch)
tree076937a143929f518e0223428cd176f58fe7f473 /strings
parente78513165c1b4e1696167e9fac6558e4492bc815 (diff)
downloadmariadb-git-33ad13280c22e0d5b1ba6bd6ceb920f49a678d95.tar.gz
ctype-simple.c:
Avoid undefined value when negating (bug#30069)
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-simple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index ccdfb5936b7..0355803daa8 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -802,7 +802,7 @@ int my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
{
if (val < 0)
{
- val= -val;
+ val= -(unsigned long int)val;
*dst++= '-';
len--;
sign= 1;
@@ -838,7 +838,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
{
if (val < 0)
{
- val = -val;
+ val = -(ulonglong)val;
*dst++= '-';
len--;
sign= 1;