tools/rgb2ycbcr.c:145: error: Null Dereference
  pointer `v` last assigned on line 142 could be null and is dereferenced at line 145, column 3.

tools/rgb2ycbcr.c:139:1: start of procedure setupLuma()
137. int	Yzero;
138. 
139. static float*
     ^
140. setupLuma(float c)
141. {

tools/rgb2ycbcr.c:142:2: 
140. setupLuma(float c)
141. {
142. 	float *v = (float *)_TIFFmalloc(256 * sizeof (float));
      ^
143. 	int i;
144. 	for (i = 0; i < 256; i++)

libtiff/tif_unix.c:253:1: start of procedure _TIFFmalloc()
  251. #endif
  252. 
  253. void*
       ^
  254. _TIFFmalloc(tmsize_t s)
  255. {

libtiff/tif_unix.c:256:2: 
  254. _TIFFmalloc(tmsize_t s)
  255. {
  256. 	return (malloc((size_t) s));
        ^
  257. }
  258. 

libtiff/tif_unix.c:257:1: return from a call to _TIFFmalloc
  255. {
  256. 	return (malloc((size_t) s));
  257. }
       ^
  258. 
  259. void

tools/rgb2ycbcr.c:144:7: 
142. 	float *v = (float *)_TIFFmalloc(256 * sizeof (float));
143. 	int i;
144. 	for (i = 0; i < 256; i++)
           ^
145. 		v[i] = c * i;
146. 	return (v);

tools/rgb2ycbcr.c:144:14: Loop condition is true. Entering loop body
142. 	float *v = (float *)_TIFFmalloc(256 * sizeof (float));
143. 	int i;
144. 	for (i = 0; i < 256; i++)
                  ^
145. 		v[i] = c * i;
146. 	return (v);

tools/rgb2ycbcr.c:145:3: 
143. 	int i;
144. 	for (i = 0; i < 256; i++)
145. 		v[i] = c * i;
       ^
146. 	return (v);
147. }

static float*
setupLuma(float c)
{
	float *v = (float *)_TIFFmalloc(256 * sizeof (float));
	int i;
	for (i = 0; i < 256; i++)
		v[i] = c * i;
	return (v);
}
['static float*\nsetupLuma(float c)\n{\n\tfloat *v = (float *)_TIFFmalloc(256 * sizeof (float));\n\tint i;\n\tfor (i = 0; i < 256; i++)\n\t\tv[i] = c * i;\n\treturn (v);\n}', 'void*\n_TIFFmalloc(tmsize_t s)\n{\n\treturn (malloc((size_t) s));\n}']