From d7c88780e1df54f34563d60bd7fa01011d2eef03 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期一, 26 一月 2026 23:17:17 +0800
Subject: [PATCH] 1.CSVData.cpp 里 unserialize 用了 8*2、125*2,但 serialize 只写 8 + 125 字节。 m_svRawData.insert 的 end 指针是 pszBuffer + 125*2,没有用 index 计算,可能把无效区域一起拷进去。 一旦 size 实际是 133(不是 266),就会直接越界,堆会被破坏,m_svDatas.clear() 在销毁元素时崩。
---
SourceCode/Bond/Servo/CPageGlassList.cpp | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/CPageGlassList.cpp b/SourceCode/Bond/Servo/CPageGlassList.cpp
index 801a337..29b3b23 100644
--- a/SourceCode/Bond/Servo/CPageGlassList.cpp
+++ b/SourceCode/Bond/Servo/CPageGlassList.cpp
@@ -1088,9 +1088,10 @@
{
CDialogEx::OnInitDialog();
- // 瀹氭椂鍣細1=鍒濆鍖栬闃咃紝2=鍛ㄦ湡鍒锋柊锛堝彧澧為噺锛�
+ // 瀹氭椂鍣細1=鍒濆鍖栬闃咃紝2=鍛ㄦ湡鍒锋柊锛堝彧澧為噺锛夛紝3=寤惰繜鍔犺浇棣栧睆鏁版嵁
SetTimer(1, 3000, nullptr);
SetTimer(2, 2000, nullptr);
+ SetTimer(3, 10, nullptr);
// 涓嬫媺妗嗘帶浠�
InitStatusCombo();
@@ -1140,7 +1141,6 @@
m_listCtrl.SetPopupFullTextColumns({ 11, 12 });
Resize();
- OnBnClickedButtonSearch(); // 瑙﹀彂涓�娆℃煡璇笌棣栧睆濉厖
return TRUE; // return TRUE unless you set the focus to a control
}
@@ -1200,6 +1200,10 @@
else if (nIDEvent == 2) {
UpdateWipData(); // 鍙仛澧為噺锛屼笉閲嶅缓
}
+ else if (nIDEvent == 3) {
+ KillTimer(3);
+ OnBnClickedButtonSearch(); // 寤惰繜棣栧睆鏌ヨ锛岄伩鍏嶅崱浣� OnInitDialog
+ }
CDialogEx::OnTimer(nIDEvent);
}
@@ -1229,6 +1233,8 @@
void CPageGlassList::OnBnClickedButtonSearch()
{
+ CWaitCursor wait; // 鏄剧ず绛夊緟鍏夋爣锛屾彁绀烘鍦ㄥ姞杞�
+
// 鑾峰彇鍏抽敭瀛楄緭鍏ユ鍐呭
CString strKeyword;
GetDlgItemText(IDC_EDIT_KEYWORD, strKeyword);
@@ -2059,4 +2065,4 @@
double randomNoise = (rand() % 100 - 50) / 100.0 * variation * 0.3; // 闅忔満鍣0
return baseValue + timeTrend + randomNoise;
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3