From 1a71bf3aafd3cd3235dbd44ad6411c4da29b329d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 25 Dec 2012 01:36:21 -0800 Subject: [PATCH] Fix potential buffer overflow. Detail can be 1024 already, I guess. --- Core/Dialog/PSPSaveDialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index e89a427c9c..5fad54b585 100644 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -238,7 +238,9 @@ void PSPSaveDialog::DisplaySaveDataInfo1() } else { - char txt[1024]; + char txt[2048]; + _dbg_assert_msg_(HLE, sizeof(txt) > sizeof(SaveFileInfo), "Local buffer is too small."); + sprintf(txt,"%s\n%02d/%02d/%d %02d:%02d %lld KB\n%s\n%s" , param.GetFileInfo(currentSelectedSave).title , param.GetFileInfo(currentSelectedSave).modif_time.tm_mday