vid.stab-1.1.1-7.fc44

List of Findings

Error: COMPILER_WARNING: [#def1]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/CMakeModules/TestSSE41.c:12:11: note[note]: called from here
#   10|     __m128i a = _mm_set_epi32(1, 2, 3, 4);
#   11|     __m128i b = _mm_set_epi32(1, 2, 3, 4);
#   12|->   int i = _mm_testz_si128(a, b);
#   13|     printf("%d\n", i);
#   14|     return 0;

Error: COMPILER_WARNING: [#def2]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/CMakeModules/TestSSSE3.c:11:16: note[note]: called from here
#    9|   {
#   10|     __m128i calcx = _mm_set_epi32(1, 2, 3, 4);
#   11|->   __m128i xx = _mm_hadd_epi32(calcx, calcx);
#   12|     int i;
#   13|     _mm_storeu_si32(&i, xx);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/libvidstab.c:35:12: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(size)’ where non-null expected
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/libvidstab.c:35:12: acquire_memory: this call could return NULL
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/libvidstab.c:35:12: danger: argument 1 (‘malloc(size)’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#   33|   /// memory allocation with zero initialization
#   34|   void* _zalloc(size_t size){
#   35|->     return memset(malloc(size),0,size);
#   36|   }
#   37|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:50:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:41:3: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:45:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:50:21: throw: if ‘vs_vector_size’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:50:21: danger: ‘f’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   48|   
#   49|     if(td->conf.simpleMotionCalculation==0){
#   50|->     for(int i=0; i< vs_vector_size(motions); i++) {
#   51|         trans->ts[i]=vsMotionsToTransform(td,VSMLMGet(motions,i), f);
#   52|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:50:21: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:41:3: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:45:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:50:21: throw: if ‘vs_vector_size’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:50:21: danger: ‘f’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   48|   
#   49|     if(td->conf.simpleMotionCalculation==0){
#   50|->     for(int i=0; i< vs_vector_size(motions); i++) {
#   51|         trans->ts[i]=vsMotionsToTransform(td,VSMLMGet(motions,i), f);
#   52|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:51:44: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:41:3: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:45:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:50:18: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:51:44: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:51:44: throw: if ‘vs_vector_get’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:51:44: danger: ‘f’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   49|     if(td->conf.simpleMotionCalculation==0){
#   50|       for(int i=0; i< vs_vector_size(motions); i++) {
#   51|->       trans->ts[i]=vsMotionsToTransform(td,VSMLMGet(motions,i), f);
#   52|       }
#   53|     }else{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:51:44: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:41:3: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:45:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:50:18: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:51:44: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:51:44: throw: if ‘vs_vector_get’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:51:44: danger: ‘f’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#   49|     if(td->conf.simpleMotionCalculation==0){
#   50|       for(int i=0; i< vs_vector_size(motions); i++) {
#   51|->       trans->ts[i]=vsMotionsToTransform(td,VSMLMGet(motions,i), f);
#   52|       }
#   53|     }else{

Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:54:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:41:3: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:45:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:54:21: throw: if ‘vs_vector_size’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:54:21: danger: ‘f’ leaks here; was opened at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#   52|       }
#   53|     }else{
#   54|->     for(int i=0; i< vs_vector_size(motions); i++) {
#   55|         trans->ts[i]=vsSimpleMotionsToTransform(td->fiSrc, td->conf.modName,VSMLMGet(motions,i));
#   56|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:54:21: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:41:3: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:45:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:54:21: throw: if ‘vs_vector_size’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:54:21: danger: ‘f’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#   52|       }
#   53|     }else{
#   54|->     for(int i=0; i< vs_vector_size(motions); i++) {
#   55|         trans->ts[i]=vsSimpleMotionsToTransform(td->fiSrc, td->conf.modName,VSMLMGet(motions,i));
#   56|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:55:75: warning[-Wanalyzer-file-leak]: leak of FILE ‘f’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:41:3: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:45:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:54:18: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:55:75: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:55:75: throw: if ‘vs_vector_get’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:55:75: danger: ‘f’ leaks here; was opened at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#   53|     }else{
#   54|       for(int i=0; i< vs_vector_size(motions); i++) {
#   55|->       trans->ts[i]=vsSimpleMotionsToTransform(td->fiSrc, td->conf.modName,VSMLMGet(motions,i));
#   56|       }
#   57|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:55:75: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:41:3: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:45:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:46:9: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:49:5: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:54:18: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:55:75: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:55:75: throw: if ‘vs_vector_get’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/localmotion2transform.c:55:75: danger: ‘f’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#   53|     }else{
#   54|       for(int i=0; i< vs_vector_size(motions); i++) {
#   55|->       trans->ts[i]=vsSimpleMotionsToTransform(td->fiSrc, td->conf.modName,VSMLMGet(motions,i));
#   56|       }
#   57|     }

Error: CPPCHECK_WARNING (CWE-457): [#def12]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/motiondetect.c:68: error[uninitvar]: Uninitialized variable: conf.algo
#   66|     conf.modName           = modName;
#   67|     conf.numThreads        = 0;
#   68|->   return conf;
#   69|   }
#   70|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def13]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/motiondetect.c:68:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘conf.algo’
#   66|     conf.modName           = modName;
#   67|     conf.numThreads        = 0;
#   68|->   return conf;
#   69|   }
#   70|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def14]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/vsvector.c:168:3: warning[-Wanalyzer-null-argument]: use of NULL ‘result.data’ where non-null expected
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/vsvector.c:164:10: enter_function: entry to ‘vs_vector_concat’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/vsvector.c:166:3: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/vsvector.c:167:27: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/vsvector.c:167:3: call_function: calling ‘vs_vector_init’ from ‘vs_vector_concat’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/vsvector.c:167:3: return_function: returning to ‘vs_vector_concat’ from ‘vs_vector_init’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/vsvector.c:168:10: release_memory: ‘result.data’ is NULL
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/src/vsvector.c:168:3: danger: argument 1 (‘result.data’) NULL where non-null expected
#  166|     assert(V1 && V2);
#  167|     vs_vector_init(&result, V1->nelems + V2->nelems);
#  168|->   memcpy(result.data, V1->data, sizeof(void*)* V1->nelems);
#  169|     memcpy(result.data+V1->nelems, V2->data, sizeof(void*)* V2->nelems);
#  170|     result.nelems=V1->nelems+V2->nelems;

Error: COMPILER_WARNING (CWE-563): [#def15]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_compareimg.c:76: warning[-Wunused-variable]: unused variable ‘diffsO’
#   76 |   int diffsO[numruns];
#      |       ^~~~~~
#   74|     int numruns = NUMCMP;
#   75|     int diffsC[numruns];
#   76|->   int diffsO[numruns];
#   77|     int timeC, timeO;
#   78|     timeC=runcompare(compareSubImg_thr, testdata->frames[0], testdata->frames[1],

Error: COMPILER_WARNING (CWE-563): [#def16]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:34: included_from: Included from here.
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_compareimg.c: scope_hint: In function ‘test_compareImg_performance’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_compareimg.c:77: warning[-Wunused-variable]: unused variable ‘timeO’
#   77 |   int timeC, timeO;
#      |              ^~~~~
#   75|     int diffsC[numruns];
#   76|     int diffsO[numruns];
#   77|->   int timeC, timeO;
#   78|     timeC=runcompare(compareSubImg_thr, testdata->frames[0], testdata->frames[1],
#   79|                      f, testdata->fi, diffsC, 0, numruns);

Error: COMPILER_WARNING: [#def17]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_contrast.c:13: warning[-Wunused-but-set-variable=]: variable ‘contrastC’ set but not used
#   13 |   double contrastC[numruns];
#      |          ^~~~~~~~~
#   11|     fprintf(stderr,"********** Contrast:\n");
#   12|     int numruns = NUMCNTR;
#   13|->   double contrastC[numruns];
#   14|     double contrastOpt[numruns];
#   15|     int timeC, timeOpt;

Error: COMPILER_WARNING (CWE-563): [#def18]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_contrast.c:14: warning[-Wunused-variable]: unused variable ‘contrastOpt’
#   14 |   double contrastOpt[numruns];
#      |          ^~~~~~~~~~~
#   12|     int numruns = NUMCNTR;
#   13|     double contrastC[numruns];
#   14|->   double contrastOpt[numruns];
#   15|     int timeC, timeOpt;
#   16|   #ifdef USE_ORC

Error: COMPILER_WARNING (CWE-563): [#def19]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:37: included_from: Included from here.
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_contrast.c: scope_hint: In function ‘test_contrastImg’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_contrast.c:15: warning[-Wunused-variable]: unused variable ‘timeOpt’
#   15 |   int timeC, timeOpt;
#      |              ^~~~~~~
#   13|     double contrastC[numruns];
#   14|     double contrastOpt[numruns];
#   15|->   int timeC, timeOpt;
#   16|   #ifdef USE_ORC
#   17|     fprintf(stderr,"********** Variance - based Contrast (with ORC):\n");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:27:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("lmtest", "w")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:21:12: branch_true: following ‘true’ branch (when ‘i != 2’)...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:22:5: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:26:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:27:3: throw: if ‘vsStoreLocalmotions’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:27:3: danger: ‘fopen("lmtest", "w")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   25|   
#   26|     FILE* f = fopen("lmtest","w");
#   27|->   vsStoreLocalmotions(f,&lms,serializationMode);
#   28|     fclose(f);
#   29|     f = fopen("lmtest","r");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:27:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("lmtest", "w")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:21:12: branch_true: following ‘true’ branch (when ‘i != 2’)...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:22:5: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:26:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:27:3: throw: if ‘vsStoreLocalmotions’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:27:3: danger: ‘fopen("lmtest", "w")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   25|   
#   26|     FILE* f = fopen("lmtest","w");
#   27|->   vsStoreLocalmotions(f,&lms,serializationMode);
#   28|     fclose(f);
#   29|     f = fopen("lmtest","r");

Error: CPPCHECK_WARNING (CWE-476): [#def22]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:28: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#   26|     FILE* f = fopen("lmtest","w");
#   27|     vsStoreLocalmotions(f,&lms,serializationMode);
#   28|->   fclose(f);
#   29|     f = fopen("lmtest","r");
#   30|     LocalMotions test = vsRestoreLocalmotions(f,serializationMode);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:30:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("lmtest", "r")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:21:12: branch_true: following ‘true’ branch (when ‘i != 2’)...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:22:5: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:29:7: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:30:23: throw: if ‘vsRestoreLocalmotions’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:30:23: danger: ‘fopen("lmtest", "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   28|     fclose(f);
#   29|     f = fopen("lmtest","r");
#   30|->   LocalMotions test = vsRestoreLocalmotions(f,serializationMode);
#   31|     fclose(f);
#   32|     vsStoreLocalmotions(stderr,&test,ASCII_SERIALIZATION_MODE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:30:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("lmtest", "r")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:21:12: branch_true: following ‘true’ branch (when ‘i != 2’)...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:22:5: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:29:7: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:30:23: throw: if ‘vsRestoreLocalmotions’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:30:23: danger: ‘fopen("lmtest", "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   28|     fclose(f);
#   29|     f = fopen("lmtest","r");
#   30|->   LocalMotions test = vsRestoreLocalmotions(f,serializationMode);
#   31|     fclose(f);
#   32|     vsStoreLocalmotions(stderr,&test,ASCII_SERIALIZATION_MODE);

Error: CPPCHECK_WARNING (CWE-476): [#def25]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:31: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#   29|     f = fopen("lmtest","r");
#   30|     LocalMotions test = vsRestoreLocalmotions(f,serializationMode);
#   31|->   fclose(f);
#   32|     vsStoreLocalmotions(stderr,&test,ASCII_SERIALIZATION_MODE);
#   33|     compare_localmotions(&lms,&test);

Error: CPPCHECK_WARNING (CWE-476): [#def26]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:42: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#   40|     md.frameNum=2;
#   41|     vsWriteToFile(&md,f,&test);
#   42|->   fclose(f);
#   43|   
#   44|     f = fopen("lmstest","r");

Error: CPPCHECK_WARNING (CWE-476): [#def27]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_store_restore.c:52: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#   50|     test_bool(vsReadFromFile(f,&read2,serializationMode)==2);
#   51|     compare_localmotions(&test,&read2);
#   52|->   fclose(f);
#   53|     fprintf(stderr,"** Reading file stepwise OKAY\n");
#   54|     vs_vector_del(&read1);

Error: CPPCHECK_WARNING (CWE-909): [#def28]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_transform.c:51: error[uninitStructMember]: Uninitialized struct member: t.barrel
#   49|       fprintf(stderr,"Transform: %s\n", getInterpolationTypeName(it));
#   50|       test_bool(vsTransformPrepare(&td,&dest,&dest)== VS_OK);
#   51|->     test_bool(transformPlanar_float(&td, t)== VS_OK);
#   52|   
#   53|       vsFrameCopy(&cfinal,&td.dest,&fi);

Error: CPPCHECK_WARNING (CWE-909): [#def29]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_transform.c:51: error[uninitStructMember]: Uninitialized struct member: t.extra
#   49|       fprintf(stderr,"Transform: %s\n", getInterpolationTypeName(it));
#   50|       test_bool(vsTransformPrepare(&td,&dest,&dest)== VS_OK);
#   51|->     test_bool(transformPlanar_float(&td, t)== VS_OK);
#   52|   
#   53|       vsFrameCopy(&cfinal,&td.dest,&fi);

Error: CPPCHECK_WARNING (CWE-909): [#def30]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_transform.c:51: error[uninitStructMember]: Uninitialized struct member: t.rshutter
#   49|       fprintf(stderr,"Transform: %s\n", getInterpolationTypeName(it));
#   50|       test_bool(vsTransformPrepare(&td,&dest,&dest)== VS_OK);
#   51|->     test_bool(transformPlanar_float(&td, t)== VS_OK);
#   52|   
#   53|       vsFrameCopy(&cfinal,&td.dest,&fi);

Error: CPPCHECK_WARNING (CWE-909): [#def31]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_transform.c:51: error[uninitStructMember]: Uninitialized struct member: t.y
#   49|       fprintf(stderr,"Transform: %s\n", getInterpolationTypeName(it));
#   50|       test_bool(vsTransformPrepare(&td,&dest,&dest)== VS_OK);
#   51|->     test_bool(transformPlanar_float(&td, t)== VS_OK);
#   52|   
#   53|       vsFrameCopy(&cfinal,&td.dest,&fi);

Error: CPPCHECK_WARNING (CWE-909): [#def32]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_transform.c:51: error[uninitStructMember]: Uninitialized struct member: t.zoom
#   49|       fprintf(stderr,"Transform: %s\n", getInterpolationTypeName(it));
#   50|       test_bool(vsTransformPrepare(&td,&dest,&dest)== VS_OK);
#   51|->     test_bool(transformPlanar_float(&td, t)== VS_OK);
#   52|   
#   53|       vsFrameCopy(&cfinal,&td.dest,&fi);

Error: CPPCHECK_WARNING (CWE-457): [#def33]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/test_transform.c:51: error[uninitvar]: Uninitialized variables: t.y, t.zoom, t.barrel, t.rshutter, t.extra
#   49|       fprintf(stderr,"Transform: %s\n", getInterpolationTypeName(it));
#   50|       test_bool(vsTransformPrepare(&td,&dest,&dest)== VS_OK);
#   51|->     test_bool(transformPlanar_float(&td, t)== VS_OK);
#   52|   
#   53|       vsFrameCopy(&cfinal,&td.dest,&fi);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def34]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:73:30: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(&name, "rb")’ where non-null expected
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:61:5: branch_true: following ‘true’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:61:5: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:66:14: branch_true: following ‘true’ branch (when ‘i != 5’)...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:67:7: branch_true: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:70:14: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:71:7: release_memory: assuming ‘fopen(&name, "rb")’ is NULL
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:73:30: danger: argument 4 (‘fopen(&name, "rb")’) NULL where non-null expected
#   71|         test_bool(file!=0);
#   72|         fprintf(stderr,"read %li bytes\n",
#   73|->               (unsigned long)fread(testdata.frames[i].data[0], 1,
#   74|                                      testdata.fi.width*testdata.fi.height,file));
#   75|         fclose(file);

Error: CPPCHECK_WARNING (CWE-476): [#def35]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:74: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: file
#   72|         fprintf(stderr,"read %li bytes\n",
#   73|                 (unsigned long)fread(testdata.frames[i].data[0], 1,
#   74|->                                    testdata.fi.width*testdata.fi.height,file));
#   75|         fclose(file);
#   76|       }

Error: CPPCHECK_WARNING (CWE-476): [#def36]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:75: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: file
#   73|                 (unsigned long)fread(testdata.frames[i].data[0], 1,
#   74|                                      testdata.fi.width*testdata.fi.height,file));
#   75|->       fclose(file);
#   76|       }
#   77|     }else{

Error: COMPILER_WARNING (CWE-697): [#def37]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c: scope_hint: In function ‘main’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:138: warning[-Waddress]: the comparison will always evaluate as ‘true’ for the address of ‘frames’ will never be NULL
#  138 |     if(&testdata.frames[i])
#      |        ^
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/tests.c:29: included_from: Included from here.
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.h:9: note: ‘frames’ declared here
#    9 |   VSFrame frames[5];
#      |           ^~~~~~
#  136|     // free
#  137|     for(int i=0; i<FRAMENUM; i++){
#  138|->     if(&testdata.frames[i])
#  139|         vsFrameFree(&testdata.frames[i]);
#  140|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:44:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:95:15: call_function: calling ‘readNumber’ from ‘loadPGMImage’
#   42|     int c,n=0;
#   43|     for(;;) {
#   44|->     c = fgetc(f);
#   45|       if (c==EOF)
#   46|         vs_log_error("TEST", "unexpected end of file in '%s'", filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:44:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:95:15: call_function: calling ‘readNumber’ from ‘loadPGMImage’
#   42|     int c,n=0;
#   43|     for(;;) {
#   44|->     c = fgetc(f);
#   45|       if (c==EOF)
#   46|         vs_log_error("TEST", "unexpected end of file in '%s'", filename);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:46:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:95:15: call_function: calling ‘readNumber’ from ‘loadPGMImage’
#   44|       c = fgetc(f);
#   45|       if (c==EOF)
#   46|->       vs_log_error("TEST", "unexpected end of file in '%s'", filename);
#   47|       if (c >= '0' && c <= '9') n = n*10 + (c - '0');
#   48|       else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:46:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:95:15: call_function: calling ‘readNumber’ from ‘loadPGMImage’
#   44|       c = fgetc(f);
#   45|       if (c==EOF)
#   46|->       vs_log_error("TEST", "unexpected end of file in '%s'", filename);
#   47|       if (c >= '0' && c <= '9') n = n*10 + (c - '0');
#   48|       else {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:47:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:95:15: call_function: calling ‘readNumber’ from ‘loadPGMImage’
#   45|       if (c==EOF)
#   46|         vs_log_error("TEST", "unexpected end of file in '%s'", filename);
#   47|->     if (c >= '0' && c <= '9') n = n*10 + (c - '0');
#   48|       else {
#   49|         ungetc (c,f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:47:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:95:15: call_function: calling ‘readNumber’ from ‘loadPGMImage’
#   45|       if (c==EOF)
#   46|         vs_log_error("TEST", "unexpected end of file in '%s'", filename);
#   47|->     if (c >= '0' && c <= '9') n = n*10 + (c - '0');
#   48|       else {
#   49|         ungetc (c,f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:60:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   58|     int c,d;
#   59|     for(;;) {
#   60|->     c = fgetc(f);
#   61|       if (c==EOF)
#   62|         vs_log_error("TEST", "unexpected end of file in '%s'", filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:60:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   58|     int c,d;
#   59|     for(;;) {
#   60|->     c = fgetc(f);
#   61|       if (c==EOF)
#   62|         vs_log_error("TEST", "unexpected end of file in '%s'", filename);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:62:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   60|       c = fgetc(f);
#   61|       if (c==EOF)
#   62|->       vs_log_error("TEST", "unexpected end of file in '%s'", filename);
#   63|   
#   64|       // skip comments

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:62:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   60|       c = fgetc(f);
#   61|       if (c==EOF)
#   62|->       vs_log_error("TEST", "unexpected end of file in '%s'", filename);
#   63|   
#   64|       // skip comments

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:67:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   65|       if (c == '#') {
#   66|         do {
#   67|->   d = fgetc(f);
#   68|     if (d==EOF)
#   69|       vs_log_error("TEST", "unexpected end of file in '%s'", filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:67:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   65|       if (c == '#') {
#   66|         do {
#   67|->   d = fgetc(f);
#   68|     if (d==EOF)
#   69|       vs_log_error("TEST", "unexpected end of file in '%s'", filename);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:69:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   67|     d = fgetc(f);
#   68|     if (d==EOF)
#   69|->     vs_log_error("TEST", "unexpected end of file in '%s'", filename);
#   70|         } while (d != '\n');
#   71|         continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:69:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   67|     d = fgetc(f);
#   68|     if (d==EOF)
#   69|->     vs_log_error("TEST", "unexpected end of file in '%s'", filename);
#   70|         } while (d != '\n');
#   71|         continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:75:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   73|   
#   74|       if (c > ' ') {
#   75|->       ungetc (c,f);
#   76|         return;
#   77|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:75:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:81:5: enter_function: entry to ‘loadPGMImage’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:92:3: call_function: calling ‘skipWhiteSpace’ from ‘loadPGMImage’
#   73|   
#   74|       if (c > ' ') {
#   75|->       ungetc (c,f);
#   76|         return;
#   77|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: throw: if ‘fgetc’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0)
#   88|   
#   89|     // read in header
#   90|->   if (fgetc(f) != 'P' || fgetc(f) != '2')
#   91|       vs_log_error("TEST","image file ist not binary PGM (no P5 header) '%s'", filename);
#   92|     skipWhiteSpace (filename,f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: throw: if ‘fgetc’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/0)
#   88|   
#   89|     // read in header
#   90|->   if (fgetc(f) != 'P' || fgetc(f) != '2')
#   91|       vs_log_error("TEST","image file ist not binary PGM (no P5 header) '%s'", filename);
#   92|     skipWhiteSpace (filename,f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:26: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:26: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:26: throw: if ‘fgetc’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:26: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/0)
#   88|   
#   89|     // read in header
#   90|->   if (fgetc(f) != 'P' || fgetc(f) != '2')
#   91|       vs_log_error("TEST","image file ist not binary PGM (no P5 header) '%s'", filename);
#   92|     skipWhiteSpace (filename,f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:26: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:26: throw: if ‘fgetc’ throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:26: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0)
#   88|   
#   89|     // read in header
#   90|->   if (fgetc(f) != 'P' || fgetc(f) != '2')
#   91|       vs_log_error("TEST","image file ist not binary PGM (no P5 header) '%s'", filename);
#   92|     skipWhiteSpace (filename,f);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:91:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:91:5: throw: if the called function throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:91:5: danger: ‘fopen(filename, "rb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
#   89|     // read in header
#   90|     if (fgetc(f) != 'P' || fgetc(f) != '2')
#   91|->     vs_log_error("TEST","image file ist not binary PGM (no P5 header) '%s'", filename);
#   92|     skipWhiteSpace (filename,f);
#   93|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:91:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:83:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:84:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:90:7: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:91:5: throw: if the called function throws an exception...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:91:5: danger: ‘fopen(filename, "rb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/0)
#   89|     // read in header
#   90|     if (fgetc(f) != 'P' || fgetc(f) != '2')
#   91|->     vs_log_error("TEST","image file ist not binary PGM (no P5 header) '%s'", filename);
#   92|     skipWhiteSpace (filename,f);
#   93|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:145:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "wb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:132:13: acquire_resource: opened here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:133:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:139:3: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:145:21: danger: ‘fopen(filename, "wb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/0)
#  143|   
#  144|     // write data
#  145|->   if (fwrite( data, fi.width*fi.height, 1, f) != 1){
#  146|       vs_log_error("TEST", "Can't write to image file '%s'", filename);
#  147|       return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:145:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "wb")’
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:132:13: acquire_memory: allocated here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:133:6: branch_false: following ‘false’ branch...
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:139:3: branch_false: ...to here
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:145:21: danger: ‘fopen(filename, "wb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
#  143|   
#  144|     // write data
#  145|->   if (fwrite( data, fi.width*fi.height, 1, f) != 1){
#  146|       vs_log_error("TEST", "Can't write to image file '%s'", filename);
#  147|       return 0;

Error: CPPCHECK_WARNING (CWE-404): [#def62]
vid.stab-05829db776069b7478dd2d90b6e0081668a41abc/tests/testutils.c:147: error[resourceLeak]: Resource leak: f
#  145|     if (fwrite( data, fi.width*fi.height, 1, f) != 1){
#  146|       vs_log_error("TEST", "Can't write to image file '%s'", filename);
#  147|->     return 0;
#  148|     }
#  149|     fclose (f);

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-209.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namevid.stab-1.1.1-7.fc44
store-results-to/tmp/tmpoun8kyzv/vid.stab-1.1.1-7.fc44.tar.xz
time-created2026-01-08 22:02:52
time-finished2026-01-08 22:04:11
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpoun8kyzv/vid.stab-1.1.1-7.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpoun8kyzv/vid.stab-1.1.1-7.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9