Tuesday, October 09, 2012

Heap corruption in C

I want to copy a string (source) to another variable (destination) in C. I can use the functions strcpy_s or strcpy for that. When compiled in debug mode (I use Visual Studio 2010), if destination buffer is too small to house the source string, strcpy_s throws an exception and stops execution. When compiled in release mode, it again stops but no messages are displayed. strcpy, on the other hand remains silent even in debug mode and the code crashes at a later malloc / free call which makes it much harder to find the problem.

Tuesday, October 02, 2012

Mühendisin ustalarla imtihanı

Geçtiğimiz 2.5 ay yeni aldığımız evin içini yaptırmakla geçti. İç mimari süreci bir ay sürer sanarken neredeyse iki ayı buldu. Bu esnada bir yandan benim yurtdışında bir ay görevli olmam, bir yandan Eylül başında kiradaki evden taşınma zorunluluğumuz, bir yandan da Derya'nın hamileliği ve tayin süreci ile uğraşmak eğlence miktarını arttırdı.