[問題] 靜態程式碼分析PSV-Studio 錯誤詢問
大家好
目前在看一份靜態分析的report 並沒有對方的程式碼
他有一個error 是
http://www.viva64.com/en/d/0208/
說真的我看不太懂....
我可以理解他memset會因為在function結尾沒必要去做這件事而被compiler拔掉
但是他有敘述一些情境
"The function on the stack creates a temporary buffer intended for password
storage. When we finish working with the password, we want to clear this
buffer. If you don't do this, the password will remain in memory, which might
lead to unpleasant consequences"
他為什麼說 the password will remain in memory...
意思是function離開後
Stack的資料還存在在某 fixed的Address直到XXXX才會被overwrite?
XXXX我不太知道是什麼情況
MSDN也有描述類似scenario....
http://tinyurl.com/79skgnq
所以說若你password不清掉
有心人士還是可以在特定timing 擷取到你password的buffer?
請教各位
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 219.87.64.222
→
07/18 12:32, , 1F
07/18 12:32, 1F
→
07/18 12:33, , 2F
07/18 12:33, 2F
→
07/18 12:34, , 3F
07/18 12:34, 3F
→
07/18 12:37, , 4F
07/18 12:37, 4F
→
07/18 17:44, , 5F
07/18 17:44, 5F
→
07/18 17:44, , 6F
07/18 17:44, 6F
→
07/18 17:45, , 7F
07/18 17:45, 7F
→
07/18 17:46, , 8F
07/18 17:46, 8F
→
07/18 17:46, , 9F
07/18 17:46, 9F
→
07/18 19:33, , 10F
07/18 19:33, 10F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章