2012-12-11 48 views
4

我開發使用OAuth的消費者庫中的iPhone應用程序,在我目前的調試器ID LLDB ,它使用下面的方法。如果我使用的NSLog生成signautureGDB遠程返回一個錯誤E08

-(NSString *)signClearText:(NSString *)text withSecret:(NSString *)secret 
{ 
//it generates base64EncodedData and then returns it as a string 
return base64EncodedResult;//this is line is executed successfully 

}//when it reaches this line it again goes to the return statement and there app  crashes 
//with the gdb error 

就在return語句之前,它成功地輸出了base64EncodeResult的值。

我嘗試了不同的調試器GDB,仍與錯誤 應用程序崩潰「不能在位置0xYYYYYYY訪問內存」

當我嘗試沒有調試程序,則應用程序不會崩潰,但它停止進一步執行...

回答

0

如果你在本地變量上有一個緩衝區溢出,它可能使堆棧幀變糟。如果發生這種情況,您可以覆蓋堆棧的返回地址,以便應用程序返回到無效地址。

+0

如何覆蓋堆棧的返回地址? – Subbu

+0

如何解決這個問題? – Rafeek

相關問題