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

tools/rgb2ycbcr.c:144:1: start of procedure setupLuma()
142. int	Yzero;
143. 
144. static float*
     ^
145. setupLuma(float c)
146. {

tools/rgb2ycbcr.c:147:2: 
145. setupLuma(float c)
146. {
147. 	float *v = (float *)_TIFFmalloc(256 * sizeof (float));
      ^
148. 	int i;
149. 	for (i = 0; i < 256; i++)

libtiff/tif_unix.c:257:1: start of procedure _TIFFmalloc()
  255. #endif
  256. 
  257. void*
       ^
  258. _TIFFmalloc(tmsize_t s)
  259. {

libtiff/tif_unix.c:260:13: Taking false branch
  258. _TIFFmalloc(tmsize_t s)
  259. {
  260.         if (s == 0)
                   ^
  261.                 return ((void *) NULL);
  262. 

libtiff/tif_unix.c:263:2: 
  261.                 return ((void *) NULL);
  262. 
  263. 	return (malloc((size_t) s));
        ^
  264. }
  265. 

libtiff/tif_unix.c:264:1: return from a call to _TIFFmalloc
  262. 
  263. 	return (malloc((size_t) s));
  264. }
       ^
  265. 
  266. void

tools/rgb2ycbcr.c:149:7: 
147. 	float *v = (float *)_TIFFmalloc(256 * sizeof (float));
148. 	int i;
149. 	for (i = 0; i < 256; i++)
           ^
150. 		v[i] = c * i;
151. 	return (v);

tools/rgb2ycbcr.c:149:14: Loop condition is true. Entering loop body
147. 	float *v = (float *)_TIFFmalloc(256 * sizeof (float));
148. 	int i;
149. 	for (i = 0; i < 256; i++)
                  ^
150. 		v[i] = c * i;
151. 	return (v);

tools/rgb2ycbcr.c:150:3: 
148. 	int i;
149. 	for (i = 0; i < 256; i++)
150. 		v[i] = c * i;
       ^
151. 	return (v);
152. }

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        if (s == 0)\n                return ((void *) NULL);\n\treturn (malloc((size_t) s));\n}']