summaryrefslogtreecommitdiff
path: root/mysys/default.c
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2006-05-29 09:06:06 +0200
committermsvensson@neptunus.(none) <>2006-05-29 09:06:06 +0200
commit91e4fd9ac934e7cfd60b4762f2b5de5176452117 (patch)
treef6ecc9b81bf485b6ce79abbead78cd46a8204802 /mysys/default.c
parent6b2ab800c998bda6a06a6838f16fc8500b1b7497 (diff)
parentdcf9810cb13fadac2129c5f4d113b0cbbaa2f554 (diff)
downloadmariadb-git-91e4fd9ac934e7cfd60b4762f2b5de5176452117.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
Diffstat (limited to 'mysys/default.c')
-rw-r--r--mysys/default.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mysys/default.c b/mysys/default.c
index 90f8dc5f689..540968d4ba0 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -755,7 +755,9 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
value_end=value;
/* remove quotes around argument */
- if ((*value == '\"' || *value == '\'') && *value == value_end[-1])
+ if ((*value == '\"' || *value == '\'') && /* First char is quote */
+ (value + 1 < value_end ) && /* String is longer than 1 */
+ *value == value_end[-1] ) /* First char is equal to last char */
{
value++;
value_end--;