Re: [hatari-devel] Patch to fix crash saving midi preferences on Mac

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]



That means strncpy always fills the whole destination buffer - using \0 if
the source string is not long enough.

Many thanks for explaining. My C is incredibly rusty (I last wrote C for a living in like 2004) so it's really good for me to learn about it. I guess what was happening is that it was writing null characters past the end of the buffer and overwriting something that the Apple C library was able to detect.
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/