all repos — mgba @ 248dbba88d0897490a46b8fcc069c144088b7cb3

mGBA Game Boy Advance Emulator

Video: Fix an issue with very long filenames
Jeffrey Pfau jeffrey@endrift.com
Thu, 23 Apr 2015 23:57:06 -0700
commit

248dbba88d0897490a46b8fcc069c144088b7cb3

parent

3426f953da86f2fd41b6f58bfe8dcb50bda93a65

2 files changed, 3 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -22,6 +22,7 @@ - Debugger: Fix use-after-free in breakpoint clearing code

- Util: Fix resource leak in UTF-8 handling code - VFS: Fix resource leaks if some allocations fail - Debugger: Fix boundary conditions in tab completion + - Video: Fix an issue with very long filenames Misc: - Qt: Show multiplayer numbers in window title - Qt: Solar sensor can have shortcuts set
M src/platform/ffmpeg/ffmpeg-encoder.csrc/platform/ffmpeg/ffmpeg-encoder.c

@@ -202,7 +202,8 @@ #ifndef USE_LIBAV

avformat_alloc_output_context2(&encoder->context, oformat, 0, outfile); #else encoder->context = avformat_alloc_context(); - strncpy(encoder->context->filename, outfile, sizeof(encoder->context->filename)); + strncpy(encoder->context->filename, outfile, sizeof(encoder->context->filename) - 1); + encoder->context->filename[sizeof(encoder->context->filename) - 1] = '\0'; encoder->context->oformat = oformat; #endif