Safe functions after heap corruption?
-
Hi, I am making a custom crash handler for application, and just thought about something. I am using sprintf, strcat and strlen in handler, are they safe to use even after possible heap corruption?
chilituna wrote:
I am using sprintf, strcat and strlen in handler, are they safe to use even after possible heap corruption?
That would depend on if they were operating on heap variables or not.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
-
Hi, I am making a custom crash handler for application, and just thought about something. I am using sprintf, strcat and strlen in handler, are they safe to use even after possible heap corruption?
In general, after the heap has been corrupted all bets are off.
Steve
-
Hi, I am making a custom crash handler for application, and just thought about something. I am using sprintf, strcat and strlen in handler, are they safe to use even after possible heap corruption?
chilituna wrote:
am using sprintf, strcat and strlen in handler, are they safe to use even after possible heap corruption?
better not try that! you will in great trouble!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You
-
Hi, I am making a custom crash handler for application, and just thought about something. I am using sprintf, strcat and strlen in handler, are they safe to use even after possible heap corruption?
Hi, thanks for answers.. Went throught source code of those (sprintf, strcat, strcpy and strlen) and it seems sprintf is unsafe, since it uses malloc, but strcat,strcpy and strlen are so simple and straightforward and they don't use heap so they are probably? ok.. Well, have to replace sprintf with strcpy,strcat,strlen combination..