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

libswscale/swscale.c:3409:1: start of procedure sws_getShiftedVec()
3407. 
3408. /* shift left / or right if "shift" is negative */
3409. static SwsVector *sws_getShiftedVec(SwsVector *a, int shift){
      ^
3410.     int length= a->length + FFABS(shift)*2;
3411.     double *coeff= av_malloc(length*sizeof(double));

libswscale/swscale.c:3410:29: Condition is true
3408. /* shift left / or right if "shift" is negative */
3409. static SwsVector *sws_getShiftedVec(SwsVector *a, int shift){
3410.     int length= a->length + FFABS(shift)*2;
                                  ^
3411.     double *coeff= av_malloc(length*sizeof(double));
3412.     int i;

libswscale/swscale.c:3410:5: 
3408. /* shift left / or right if "shift" is negative */
3409. static SwsVector *sws_getShiftedVec(SwsVector *a, int shift){
3410.     int length= a->length + FFABS(shift)*2;
          ^
3411.     double *coeff= av_malloc(length*sizeof(double));
3412.     int i;

libswscale/swscale.c:3411:5: 
3409. static SwsVector *sws_getShiftedVec(SwsVector *a, int shift){
3410.     int length= a->length + FFABS(shift)*2;
3411.     double *coeff= av_malloc(length*sizeof(double));
          ^
3412.     int i;
3413.     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:3413:5: 
3411.     double *coeff= av_malloc(length*sizeof(double));
3412.     int i;
3413.     SwsVector *vec= av_malloc(sizeof(SwsVector));
          ^
3414. 
3415.     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:3415:5: 
3413.     SwsVector *vec= av_malloc(sizeof(SwsVector));
3414. 
3415.     vec->coeff= coeff;
          ^
3416.     vec->length= length;
3417. 

static SwsVector *sws_getShiftedVec(SwsVector *a, int shift){
    int length= a->length + FFABS(shift)*2;
    double *coeff= av_malloc(length*sizeof(double));
    int i;
    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++)
    {
        coeff[i + (length-1)/2 - (a->length-1)/2 - shift]= a->coeff[i];
    }
    return vec;
}
['static SwsVector *sws_getShiftedVec(SwsVector *a, int shift){\n    int length= a->length + FFABS(shift)*2;\n    double *coeff= av_malloc(length*sizeof(double));\n    int i;\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        coeff[i + (length-1)/2 - (a->length-1)/2 - shift]= a->coeff[i];\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}']