diff options
author | monty@mashka.mysql.fi <> | 2002-12-05 03:40:33 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-12-05 03:40:33 +0200 |
commit | fc06433a69113a914b58f5bb78b98b39f3dce4b8 (patch) | |
tree | acbe11728f20cce01476a8928088773d8016fe76 /strings | |
parent | 7d41cd44c69fd23f49de52d6e436d3f821a68ca3 (diff) | |
download | mariadb-git-fc06433a69113a914b58f5bb78b98b39f3dce4b8.tar.gz |
Removed copying of parameters as this leads to memory leaks in embedded server.
Fixed 'not initialized' memory error.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/strto.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/strings/strto.c b/strings/strto.c index 84dccbcbeb8..c98b19a7e67 100644 --- a/strings/strto.c +++ b/strings/strto.c @@ -103,6 +103,7 @@ function (const char *nptr,char **endptr,int base) } /* Check for a sign. */ + negative= 0; if (*s == '-') { negative = 1; @@ -110,11 +111,9 @@ function (const char *nptr,char **endptr,int base) } else if (*s == '+') { - negative = 0; ++s; } - else - negative = 0; + if (base == 16 && s[0] == '0' && toupper (s[1]) == 'X') s += 2; |