[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/makesdna DNA_sequence_types.h blender/source/blender/src drawseq.c editseq.c interface.c sequence.c transform.c

Daniel Dunbar evilzr at yahoo.com
Thu Mar 24 15:19:28 CET 2005


>   Also replaced all strcpy() and strcat() with strncpy/strncat, with the
>   defines in it.

You should not use strncpy like this. This is dangerous.
strncpy *DOES NOT* ensure that the string it builds is '\0'
terminated if the string is too long.

Use BLI_strncpy(str, ...., sizeof(str)) !!!!

And note: don't hardcode the string constant when you could call
sizeof on it.


daniel dunbar


More information about the Bf-committers mailing list