diff options
author | Lautis Sun <lautis0503@gmail.com> | 2016-09-07 19:22:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-07 19:22:02 +0300 |
commit | 637c79edd341247cbf7f84b90da34b8920f3851f (patch) | |
tree | df6a12a9c3cff1bf6d7a04d86aa31780d3438c6f | |
parent | d4d5eb2d07762457096f602d8fa2ffaa81397b10 (diff) |
Make dir_name_buf no longer than _TINYDIR_FILENAME_MAX
Like the previous commit, _splitpath_s may not work fine with too long buffer of parameters.
Refer to https://msdn.microsoft.com/en-us/library/8e46eyt7.aspx#Anchor_3
-rw-r--r-- | tinydir.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -639,7 +639,7 @@ int tinydir_file_open(tinydir_file *file, const _tinydir_char_t *path) _tsplitpath_s( path, drive_buf, _TINYDIR_DRIVE_MAX, - dir_name_buf, _TINYDIR_PATH_MAX, + dir_name_buf, _TINYDIR_FILENAME_MAX, file_name_buf, _TINYDIR_FILENAME_MAX, ext_buf, sizeof _TINYDIR_FILENAME_MAX); #else |