[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/imbuf/intern dynlibtiff.c gen_dynlibtiff.py

Alexander Ewering blender at instinctive.de
Tue Nov 22 21:52:08 CET 2005


On Tue, 22 Nov 2005, Kent Mein wrote:

> sirdude (Kent Mein) 2005/11/22 21:24:28 CET
>
>  Modified files:
>    blender/source/blender/imbuf/intern dynlibtiff.c
>                                        gen_dynlibtiff.py
>
>  Log:
>  got rid of snprintf....  Replaced with MEM_mallocN and friends...

I have a few concerns about this:

>  size = sizeof(getenv("BF_TIFF_LIB"));

sizeof(getenv()) is always 4 or 8 - probably not what you want. You
probably mean strlen instead.

> filename = MEM_mallocN(size * sizeof(unsigned char),"ENVVAR");

sizeof(char) is always 1

> memcpy(filename,getenv("BF_TIFF_LIB"),size);

This would not copy the terminating NULL character, even *if* size
*were* correct.

If I may, I will correct these errors and commit.

| alexander ewering              instinctive mediaworks
| ae[@]instinctive[.]de   http://www[.]instinctive[.]de


More information about the Bf-committers mailing list