Skip to content

Commit 8c7cab0

Browse files
author
Yashwant Sahu
committed
Bug# 20376760: STACK-BUFFER-OVERFLOW WITH LONG PATHS TO CERTAIN VARIABLES
2 parents 4997c2a + 9068238 commit 8c7cab0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mysys/mf_loadpath.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
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,
4747
(void) strnmov(buff, path, FN_REFLEN); /* Return org file name */
4848
}
4949
else
50-
(void) strxnmov(buff, FN_REFLEN, own_path_prefix, path, NullS);
50+
(void) strxnmov(buff, sizeof(buff)-1, own_path_prefix, path, NullS);
5151
strnmov(to, buff, FN_REFLEN);
5252
to[FN_REFLEN-1]= '\0';
5353
DBUG_PRINT("exit",("to: %s",to));

0 commit comments

Comments
 (0)