summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorYashwant Sahu <yashwant.sahu@oracle.com>2015-06-24 17:48:46 +0530
committerYashwant Sahu <yashwant.sahu@oracle.com>2015-06-24 17:48:46 +0530
commit9068238b1984100dc2251f742a994b18fafaa841 (patch)
tree3a8aa90d450ddbc326428164e00dfeddf34e09d4 /mysys
parent0eadadad25d9e44232e1567897cf9dcb957ccdcd (diff)
downloadmariadb-git-9068238b1984100dc2251f742a994b18fafaa841.tar.gz
Bug# 20376760: STACK-BUFFER-OVERFLOW WITH LONG PATHS TO CERTAIN VARIABLES
Diffstat (limited to 'mysys')
-rw-r--r--mysys/mf_loadpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/mf_loadpath.c b/mysys/mf_loadpath.c
index 776435e0e75..812c3895bec 100644
--- a/mysys/mf_loadpath.c
+++ b/mysys/mf_loadpath.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ char * my_load_path(char * to, const char *path,
(void) strnmov(buff, path, FN_REFLEN); /* Return org file name */
}
else
- (void) strxnmov(buff, FN_REFLEN, own_path_prefix, path, NullS);
+ (void) strxnmov(buff, sizeof(buff)-1, own_path_prefix, path, NullS);
strnmov(to, buff, FN_REFLEN);
to[FN_REFLEN-1]= '\0';
DBUG_PRINT("exit",("to: %s",to));