libswscale/swscale.c:2955: error: Null Dereference
  pointer `vec` last assigned on line 2953 could be null and is dereferenced at line 2955, column 5.

libswscale/swscale.c:2949:1: start of procedure sws_getConvVec()
2947. }
2948. 
2949. static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b){
      ^
2950.     int length= a->length + b->length - 1;
2951.     double *coeff= av_malloc(length*sizeof(double));

libswscale/swscale.c:2950:5: 
2948. 
2949. static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b){
2950.     int length= a->length + b->length - 1;
          ^
2951.     double *coeff= av_malloc(length*sizeof(double));
2952.     int i, j;

libswscale/swscale.c:2951:5: 
2949. static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b){
2950.     int length= a->length + b->length - 1;
2951.     double *coeff= av_malloc(length*sizeof(double));
          ^
2952.     int i, j;
2953.     SwsVector *vec= av_malloc(sizeof(SwsVector));

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking false branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:66:9: Taking false branch
  64.     ((char*)ptr)[-1]= diff;
  65. #elif HAVE_POSIX_MEMALIGN
  66.     if (posix_memalign(&ptr,16,size))
              ^
  67.         ptr = NULL;
  68. #elif HAVE_MEMALIGN

libavutil/mem.c:99:5: 
   97.     ptr = malloc(size);
   98. #endif
   99.     return ptr;
           ^
  100. }
  101. 

libavutil/mem.c:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

libswscale/swscale.c:2953:5: 
2951.     double *coeff= av_malloc(length*sizeof(double));
2952.     int i, j;
2953.     SwsVector *vec= av_malloc(sizeof(SwsVector));
          ^
2954. 
2955.     vec->coeff= coeff;

libavutil/mem.c:47:1: start of procedure av_malloc()
  45.    linker will do it automatically. */
  46. 
  47. void *av_malloc(unsigned int size)
      ^
  48. {
  49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
  47. void *av_malloc(unsigned int size)
  48. {
  49.     void *ptr = NULL;
          ^
  50. #if CONFIG_MEMALIGN_HACK
  51.     long diff;

libavutil/mem.c:55:8: Taking false branch
  53. 
  54.     /* let's disallow possible ambiguous cases */
  55.     if(size > (INT_MAX-16) )
             ^
  56.         return NULL;
  57. 

libavutil/mem.c:66:9: Taking true branch
  64.     ((char*)ptr)[-1]= diff;
  65. #elif HAVE_POSIX_MEMALIGN
  66.     if (posix_memalign(&ptr,16,size))
              ^
  67.         ptr = NULL;
  68. #elif HAVE_MEMALIGN

libavutil/mem.c:67:9: 
  65. #elif HAVE_POSIX_MEMALIGN
  66.     if (posix_memalign(&ptr,16,size))
  67.         ptr = NULL;
              ^
  68. #elif HAVE_MEMALIGN
  69.     ptr = memalign(16,size);

libavutil/mem.c:99:5: 
   97.     ptr = malloc(size);
   98. #endif
   99.     return ptr;
           ^
  100. }
  101. 

libavutil/mem.c:100:1: return from a call to av_malloc
   98. #endif
   99.     return ptr;
  100. }
       ^
  101. 
  102. void *av_realloc(void *ptr, unsigned int size)

libswscale/swscale.c:2955:5: 
2953.     SwsVector *vec= av_malloc(sizeof(SwsVector));
2954. 
2955.     vec->coeff= coeff;
          ^
2956.     vec->length= length;
2957. 

static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b){
    int length= a->length + b->length - 1;
    double *coeff= av_malloc(length*sizeof(double));
    int i, j;
    SwsVector *vec= av_malloc(sizeof(SwsVector));
    vec->coeff= coeff;
    vec->length= length;
    for (i=0; i<length; i++) coeff[i]= 0.0;
    for (i=0; i<a->length; i++)
    {
        for (j=0; j<b->length; j++)
        {
            coeff[i+j]+= a->coeff[i]*b->coeff[j];
        }
    }
    return vec;
}
['static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b){\n    int length= a->length + b->length - 1;\n    double *coeff= av_malloc(length*sizeof(double));\n    int i, j;\n    SwsVector *vec= av_malloc(sizeof(SwsVector));\n    vec->coeff= coeff;\n    vec->length= length;\n    for (i=0; i<length; i++) coeff[i]= 0.0;\n    for (i=0; i<a->length; i++)\n    {\n        for (j=0; j<b->length; j++)\n        {\n            coeff[i+j]+= a->coeff[i]*b->coeff[j];\n        }\n    }\n    return vec;\n}', 'void *av_malloc(unsigned int size)\n{\n    void *ptr = NULL;\n#if CONFIG_MEMALIGN_HACK\n    long diff;\n#endif\n    if(size > (INT_MAX-16) )\n        return NULL;\n#if CONFIG_MEMALIGN_HACK\n    ptr = malloc(size+16);\n    if(!ptr)\n        return ptr;\n    diff= ((-(long)ptr - 1)&15) + 1;\n    ptr = (char*)ptr + diff;\n    ((char*)ptr)[-1]= diff;\n#elif HAVE_POSIX_MEMALIGN\n    if (posix_memalign(&ptr,16,size))\n        ptr = NULL;\n#elif HAVE_MEMALIGN\n    ptr = memalign(16,size);\n#else\n    ptr = malloc(size);\n#endif\n    return ptr;\n}']