Launch retroarch from the command line with the --appendconfig option and a long / multiple config string.
Observe [ERROR] [Config]: Failed to append config in the output.
Bisect Results
Difficult to tell.
However, this might be caused in function config_load_file in RetroArch/configuration.c.
append_config_path is stored in temporary variable with an arbitrary size char tmp_append_path[PATH_MAX_LENGTH] and not checking the actual size of the commanding option.
That's ok if only one config file is specified but could cause problems when multiple config files are specified.
I could be wrong.
Description
Command line option --appendconfig fails to apply all config files when a certain command line length is reached.
Expected behavior
Appendconfig applies all config files regardless how long the total input.
Actual behavior
When the appendconfig limit is reached, all subsequent config files are not applied.
Example:
/usr/bin/retroarch -v --appendconfig "/home/retrogamer/.config/retroarch/appendconfig/DEFAULT.cfg|/home/retrogamer/.config/retroarch/appendconfig/Platform/Sony_PlayStation.cfg|/home/retrogamer/.config/retroarch/appendconfig/Core/Beetle_PSX_HW.cfg|/home/retrogamer/.config/retroarch/appendconfig/Game/Sony_PlayStation/Tekken (USA).cfg" -L /usr/lib64/libretro/mednafen_psx_hw_libretro.so "/home/retrogamer/retromachine/games_1/Sony_PlayStation/Tekken (USA).m3u"
[INFO] [Config]: Loading default config. [INFO] [Config]: Looking for config in: "/home/retrogamer/.config/retroarch/retroarch.cfg". [INFO] [Config]: Appending config "/home/retrogamer/.config/retroarch/appendconfig/DEFAULT.cfg". [INFO] [Config]: Appending config "/home/retrogamer/.config/retroarch/appendconfig/Platform/Sony_PlayStation.cfg". [INFO] [Config]: Appending config "/home/retrogamer/.config/retroarch/appendconfig/Core/Beetle_PSX_HW.cfg". [INFO] [Config]: Appending config "/home/retrogamer/.config/retroarch/appendconfi". [ERROR] [Config]: Failed to append config "/home/retrogamer/.config/retroarch/appendconfi".
Steps to reproduce the bug
Bisect Results
Difficult to tell. However, this might be caused in function config_load_file in RetroArch/configuration.c. append_config_path is stored in temporary variable with an arbitrary size char tmp_append_path[PATH_MAX_LENGTH] and not checking the actual size of the commanding option. That's ok if only one config file is specified but could cause problems when multiple config files are specified. I could be wrong.
Version/Commit
Environment information