Newly introduced findings

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
SDL3-3.4.0/include/SDL3/SDL_rect.h:209: warning[nullPointer]: Possible null pointer dereference: b
#  207|   {
#  208|       return (a && b && (a->x == b->x) && (a->y == b->y) &&
#  209|->             (a->w == b->w) && (a->h == b->h)) ? true : false;
#  210|   }
#  211|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
SDL3-3.4.0/redhat-linux-build/wayland-generated-protocols/wayland-client-protocol.h:1305:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:425:13: enter_function: entry to ‘Wayland_data_offer_check_source’
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:430:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:434:5: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:435:8: branch_false: following ‘false’ branch (when ‘data_device’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:437:16: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:437:15: branch_false: following ‘false’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:440:13: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:440:12: branch_true: following ‘true’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:441:13: call_function: inlined call to ‘wl_callback_destroy’ from ‘Wayland_data_offer_check_source’
# 1303|   wl_callback_destroy(struct wl_callback *wl_callback)
# 1304|   {
# 1305|-> 	wl_proxy_destroy((struct wl_proxy *) wl_callback);
# 1306|   }
# 1307|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
SDL3-3.4.0/redhat-linux-build/wayland-generated-protocols/wayland-client-protocol.h:1305:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:425:13: enter_function: entry to ‘Wayland_data_offer_check_source’
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:430:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:434:5: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:435:8: branch_false: following ‘false’ branch (when ‘data_device’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:437:16: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:437:15: branch_false: following ‘false’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:440:13: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:440:12: branch_true: following ‘true’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:441:13: call_function: inlined call to ‘wl_callback_destroy’ from ‘Wayland_data_offer_check_source’
# 1303|   wl_callback_destroy(struct wl_callback *wl_callback)
# 1304|   {
# 1305|-> 	wl_proxy_destroy((struct wl_proxy *) wl_callback);
# 1306|   }
# 1307|   

Error: CPPCHECK_WARNING (CWE-664): [#def4]
SDL3-3.4.0/src/SDL_error.c:50: error[va_list_usedBeforeStarted]: va_list 'ap2' used before va_start() was called.
#   48|           error->error = SDL_ErrorCodeGeneric;
#   49|   
#   50|->         va_copy(ap2, ap);
#   51|           result = SDL_vsnprintf(error->str, error->len, fmt, ap2);
#   52|           va_end(ap2);

Error: CPPCHECK_WARNING (CWE-664): [#def5]
SDL3-3.4.0/src/SDL_error.c:51: error[va_list_usedBeforeStarted]: va_list 'ap2' used before va_start() was called.
#   49|   
#   50|           va_copy(ap2, ap);
#   51|->         result = SDL_vsnprintf(error->str, error->len, fmt, ap2);
#   52|           va_end(ap2);
#   53|   

Error: CPPCHECK_WARNING (CWE-664): [#def6]
SDL3-3.4.0/src/SDL_error.c:52: error[va_list_usedBeforeStarted]: va_list 'ap2' used before va_start() was called.
#   50|           va_copy(ap2, ap);
#   51|           result = SDL_vsnprintf(error->str, error->len, fmt, ap2);
#   52|->         va_end(ap2);
#   53|   
#   54|           if (result >= 0 && (size_t)result >= error->len && error->realloc_func) {

Error: CPPCHECK_WARNING (CWE-664): [#def7]
SDL3-3.4.0/src/SDL_error.c:60: error[va_list_usedBeforeStarted]: va_list 'ap2' used before va_start() was called.
#   58|                   error->str = str;
#   59|                   error->len = len;
#   60|->                 va_copy(ap2, ap);
#   61|                   (void)SDL_vsnprintf(error->str, error->len, fmt, ap2);
#   62|                   va_end(ap2);

Error: CPPCHECK_WARNING (CWE-664): [#def8]
SDL3-3.4.0/src/SDL_error.c:61: error[va_list_usedBeforeStarted]: va_list 'ap2' used before va_start() was called.
#   59|                   error->len = len;
#   60|                   va_copy(ap2, ap);
#   61|->                 (void)SDL_vsnprintf(error->str, error->len, fmt, ap2);
#   62|                   va_end(ap2);
#   63|               }

Error: CPPCHECK_WARNING (CWE-664): [#def9]
SDL3-3.4.0/src/SDL_error.c:62: error[va_list_usedBeforeStarted]: va_list 'ap2' used before va_start() was called.
#   60|                   va_copy(ap2, ap);
#   61|                   (void)SDL_vsnprintf(error->str, error->len, fmt, ap2);
#   62|->                 va_end(ap2);
#   63|               }
#   64|           }

Error: GCC_ANALYZER_WARNING (CWE-121): [#def10]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3705:13: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3704:12: branch_true: following ‘true’ branch...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3705:43: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3705:13: danger: out-of-bounds write from byte 48 till byte 55 but ‘combinedImageSamplerDescriptor’ ends at byte 48
# 3703|           SDL_zerop(pImageInfo);
# 3704|           if (descriptorSetLayout == rendererData->descriptorSetLayout) {
# 3705|->             pImageInfo->sampler = samplers[i];
# 3706|           } else {
# 3707|               // Ignore the sampler if we're using YcBcCr data since it will be baked in the descriptor set layout

Error: GCC_ANALYZER_WARNING (CWE-121): [#def11]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3709:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3709:9: danger: out-of-bounds write from byte 56 till byte 63 but ‘combinedImageSamplerDescriptor’ ends at byte 48
# 3707|               // Ignore the sampler if we're using YcBcCr data since it will be baked in the descriptor set layout
# 3708|           }
# 3709|->         pImageInfo->imageView = imageViews[i];
# 3710|           pImageInfo->imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
# 3711|   

Error: GCC_ANALYZER_WARNING (CWE-121): [#def12]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3710:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3710:9: danger: out-of-bounds write from byte 64 till byte 67 but ‘combinedImageSamplerDescriptor’ ends at byte 48
# 3708|           }
# 3709|           pImageInfo->imageView = imageViews[i];
# 3710|->         pImageInfo->imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
# 3711|   
# 3712|           SDL_assert(descriptorCount < SDL_arraysize(descriptorWrites));

Error: GCC_ANALYZER_WARNING (CWE-121): [#def13]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3714:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3714:9: danger: out-of-bounds write from byte 192 till byte 195 but ‘descriptorWrites’ ends at byte 192
# 3712|           SDL_assert(descriptorCount < SDL_arraysize(descriptorWrites));
# 3713|           VkWriteDescriptorSet *pDescriptorSet = &descriptorWrites[descriptorCount++];
# 3714|->         pDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
# 3715|           pDescriptorSet->dstSet = descriptorSet;
# 3716|           pDescriptorSet->dstBinding = 1 + i;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def14]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3715:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3715:9: danger: out-of-bounds write from byte 208 till byte 215 but ‘descriptorWrites’ ends at byte 192
# 3713|           VkWriteDescriptorSet *pDescriptorSet = &descriptorWrites[descriptorCount++];
# 3714|           pDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
# 3715|->         pDescriptorSet->dstSet = descriptorSet;
# 3716|           pDescriptorSet->dstBinding = 1 + i;
# 3717|           pDescriptorSet->dstArrayElement = 0;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def15]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3716:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3716:9: danger: out-of-bounds write from byte 216 till byte 219 but ‘descriptorWrites’ ends at byte 192
# 3714|           pDescriptorSet->sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
# 3715|           pDescriptorSet->dstSet = descriptorSet;
# 3716|->         pDescriptorSet->dstBinding = 1 + i;
# 3717|           pDescriptorSet->dstArrayElement = 0;
# 3718|           pDescriptorSet->descriptorCount = 1;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def16]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3717:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3717:9: danger: out-of-bounds write from byte 220 till byte 223 but ‘descriptorWrites’ ends at byte 192
# 3715|           pDescriptorSet->dstSet = descriptorSet;
# 3716|           pDescriptorSet->dstBinding = 1 + i;
# 3717|->         pDescriptorSet->dstArrayElement = 0;
# 3718|           pDescriptorSet->descriptorCount = 1;
# 3719|           pDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def17]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3718:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3718:9: danger: out-of-bounds write from byte 224 till byte 227 but ‘descriptorWrites’ ends at byte 192
# 3716|           pDescriptorSet->dstBinding = 1 + i;
# 3717|           pDescriptorSet->dstArrayElement = 0;
# 3718|->         pDescriptorSet->descriptorCount = 1;
# 3719|           pDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
# 3720|           pDescriptorSet->pImageInfo = pImageInfo;

Error: GCC_ANALYZER_WARNING (CWE-121): [#def18]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3719:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3719:9: danger: out-of-bounds write from byte 228 till byte 231 but ‘descriptorWrites’ ends at byte 192
# 3717|           pDescriptorSet->dstArrayElement = 0;
# 3718|           pDescriptorSet->descriptorCount = 1;
# 3719|->         pDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
# 3720|           pDescriptorSet->pImageInfo = pImageInfo;
# 3721|       }

Error: GCC_ANALYZER_WARNING (CWE-121): [#def19]
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3720:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3700:21: branch_true: following ‘true’ branch (when ‘i < numImages’)...
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3702:32: branch_true: ...to here
SDL3-3.4.0/src/render/vulkan/SDL_render_vulkan.c:3720:9: danger: out-of-bounds write from byte 232 till byte 239 but ‘descriptorWrites’ ends at byte 192
# 3718|           pDescriptorSet->descriptorCount = 1;
# 3719|           pDescriptorSet->descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
# 3720|->         pDescriptorSet->pImageInfo = pImageInfo;
# 3721|       }
# 3722|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def20]
SDL3-3.4.0/src/test/SDL_test_log.c:84:11: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
SDL3-3.4.0/src/test/SDL_test_log.c:121:6: enter_function: entry to ‘SDLTest_LogError’
SDL3-3.4.0/src/test/SDL_test_log.c:125:5: acquire_resource: ‘va_start’ called here
SDL3-3.4.0/src/test/SDL_test_log.c:126:5: call_function: calling ‘SDLTest_LogMessageV’ from ‘SDLTest_LogError’
#   82|       /* Print log message into a buffer */
#   83|       SDL_memset(logMessage, 0, SDLTEST_MAX_LOGMESSAGE_LENGTH);
#   84|->     (void)SDL_vsnprintf(logMessage, SDLTEST_MAX_LOGMESSAGE_LENGTH - 1, fmt, ap);
#   85|   
#   86|       /* Log with timestamp and newline. Messages with lower priority are slightly indented. */

Error: CPPCHECK_WARNING (CWE-457): [#def21]
SDL3-3.4.0/src/video/stb_image.h:4622: warning[uninitvar]: Uninitialized variable: lencodes
# 4620|      }
# 4621|      if (n != ntot) return stbi__err("bad codelengths","Corrupt PNG");
# 4622|->    if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0;
# 4623|      if (!stbi__zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0;
# 4624|      return 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def22]
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:444:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:430:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:434:5: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:435:8: branch_false: following ‘false’ branch (when ‘data_device’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:437:16: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:437:15: branch_false: following ‘false’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:440:13: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:443:12: branch_true: following ‘true’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:444:13: branch_true: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:444:13: throw: if ‘close’ throws an exception...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:444:13: danger: ‘pipefd[0]’ leaks here
#  442|           }
#  443|           if (offer->read_fd >= 0) {
#  444|->             close(offer->read_fd);
#  445|           }
#  446|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:444:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[1]’
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:430:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:434:5: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:435:8: branch_false: following ‘false’ branch (when ‘data_device’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:437:16: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:437:15: branch_false: following ‘false’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:440:13: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:443:12: branch_true: following ‘true’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:444:13: branch_true: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:444:13: throw: if ‘close’ throws an exception...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:444:13: danger: ‘pipefd[1]’ leaks here
#  442|           }
#  443|           if (offer->read_fd >= 0) {
#  444|->             close(offer->read_fd);
#  445|           }
#  446|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:524:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:511:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:515:5: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:516:8: branch_false: following ‘false’ branch (when ‘data_device’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:518:16: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:518:15: branch_false: following ‘false’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:521:56: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:524:9: throw: if the called function throws an exception...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:524:9: danger: ‘pipefd[0]’ leaks here
#  522|           close(pipefd[1]);
#  523|   
#  524|->         WAYLAND_wl_display_flush(data_device->seat->display->display);
#  525|   
#  526|           while (read_pipe(pipefd[0], &buffer, length) > 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:558:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:545:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:549:5: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:550:8: branch_false: following ‘false’ branch (when ‘primary_selection_device’ is non-NULL)...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:552:16: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:552:15: branch_false: following ‘false’ branch...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:555:73: branch_false: ...to here
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:558:9: throw: if the called function throws an exception...
SDL3-3.4.0/src/video/wayland/SDL_waylanddatamanager.c:558:9: danger: ‘pipefd[0]’ leaks here
#  556|           close(pipefd[1]);
#  557|   
#  558|->         WAYLAND_wl_display_flush(primary_selection_device->seat->display->display);
#  559|   
#  560|           while (read_pipe(pipefd[0], &buffer, length) > 0) {

Error: CPPCHECK_WARNING (CWE-457): [#def26]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:304: error[uninitvar]: Uninitialized variables: seat.display, seat.wl_seat, seat.data_device, seat.primary_selection_device, seat.name, seat.link, seat.last_implicit_grab_serial, seat.registry_id, seat.keyboard, seat.pointer, seat.touch, seat.text_input, seat.tablet
#  302|           SDL_WaylandSeat *seat;
#  303|           wl_list_for_each (seat, &display->seat_list, link) {
#  304|->             Wayland_SeatRegisterInputTimestampListeners(seat);
#  305|           }
#  306|       }

Error: CPPCHECK_WARNING (CWE-457): [#def27]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:370: error[uninitvar]: Uninitialized variables: seat.display, seat.wl_seat, seat.data_device, seat.primary_selection_device, seat.name, seat.link, seat.last_implicit_grab_serial, seat.registry_id, seat.keyboard, seat.pointer, seat.touch, seat.text_input, seat.tablet
#  368|       SDL_WaylandSeat *seat;
#  369|       wl_list_for_each (seat, &display->seat_list, link) {
#  370|->         Wayland_SeatCreatePointerGestures(seat);
#  371|       }
#  372|   }

Error: CPPCHECK_WARNING (CWE-457): [#def28]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:383: error[uninitvar]: Uninitialized variable: tool->cursor_state.cursor_shape
#  381|           SDL_WaylandPenTool *tool;
#  382|           wl_list_for_each(tool, &seat->tablet.tool_list, link) {
#  383|->             if (!tool->cursor_state.cursor_shape) {
#  384|                   tool->cursor_state.cursor_shape = wp_cursor_shape_manager_v1_get_tablet_tool_v2(seat->display->cursor_shape_manager, tool->wltool);
#  385|               }

Error: CPPCHECK_WARNING (CWE-457): [#def29]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:394: error[uninitvar]: Uninitialized variables: seat.display, seat.wl_seat, seat.data_device, seat.primary_selection_device, seat.name, seat.link, seat.last_implicit_grab_serial, seat.registry_id, seat.keyboard, seat.pointer, seat.touch, seat.text_input, seat.tablet
#  392|       SDL_WaylandSeat *seat;
#  393|       wl_list_for_each (seat, &display->seat_list, link) {
#  394|->         Wayland_SeatCreateCursorShape(seat);
#  395|       }
#  396|   }

Error: CPPCHECK_WARNING (CWE-457): [#def30]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:1484: error[uninitvar]: Uninitialized variables: tp.id, tp.fx, tp.fy, tp.surface, tp.link
# 1482|       // Need the safe loop variant here as cancelling a touch point removes it from the list.
# 1483|       wl_list_for_each_safe (tp, temp, &seat->touch.points, link) {
# 1484|->         Wayland_SeatCancelTouch(seat, tp);
# 1485|       }
# 1486|   }

Error: CPPCHECK_WARNING (CWE-457): [#def31]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3182: error[uninitvar]: Uninitialized variables: seat.display, seat.wl_seat, seat.data_device, seat.primary_selection_device, seat.name, seat.link, seat.last_implicit_grab_serial, seat.registry_id, seat.keyboard, seat.pointer, seat.touch, seat.text_input, seat.tablet
# 3180|       SDL_WaylandSeat *seat;
# 3181|       wl_list_for_each (seat, &display->seat_list, link) {
# 3182|->         Wayland_SeatCreateDataDevice(seat);
# 3183|       }
# 3184|   }

Error: CPPCHECK_WARNING (CWE-457): [#def32]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3216: error[uninitvar]: Uninitialized variables: seat.display, seat.wl_seat, seat.data_device, seat.primary_selection_device, seat.name, seat.link, seat.last_implicit_grab_serial, seat.registry_id, seat.keyboard, seat.pointer, seat.touch, seat.text_input, seat.tablet
# 3214|       SDL_WaylandSeat *seat;
# 3215|       wl_list_for_each (seat, &display->seat_list, link) {
# 3216|->         Wayland_SeatCreatePrimarySelectionDevice(seat);
# 3217|       }
# 3218|   }

Error: CPPCHECK_WARNING (CWE-457): [#def33]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3237: error[uninitvar]: Uninitialized variables: seat.display, seat.wl_seat, seat.data_device, seat.primary_selection_device, seat.name, seat.link, seat.last_implicit_grab_serial, seat.registry_id, seat.keyboard, seat.pointer, seat.touch, seat.text_input, seat.tablet
# 3235|       SDL_WaylandSeat *seat;
# 3236|       wl_list_for_each(seat, &d->seat_list, link) {
# 3237|->         Wayland_SeatCreateTextInput(seat);
# 3238|       }
# 3239|   }

Error: CPPCHECK_WARNING (CWE-457): [#def34]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3295: warning[uninitvar]: Uninitialized variables: sdltool.instance_id, sdltool.info, sdltool.focus, sdltool.wltool, sdltool.proximity_serial, sdltool.frame, sdltool.cursor_state, sdltool.link
# 3293|   {
# 3294|       SDL_WaylandPenTool *sdltool = (SDL_WaylandPenTool *) data;
# 3295|->     if (sdltool->instance_id) {
# 3296|           SDL_Window *window = sdltool->focus ? sdltool->focus->sdlwindow : NULL;
# 3297|           SDL_RemovePenDevice(0, window, sdltool->instance_id);

Error: CPPCHECK_WARNING (CWE-457): [#def35]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3553: error[uninitvar]: Uninitialized variables: seat.display, seat.wl_seat, seat.data_device, seat.primary_selection_device, seat.name, seat.link, seat.last_implicit_grab_serial, seat.registry_id, seat.keyboard, seat.pointer, seat.touch, seat.text_input, seat.tablet
# 3551|       SDL_WaylandSeat *seat;
# 3552|       wl_list_for_each (seat, &display->seat_list, link) {
# 3553|->         Wayland_SeatInitTabletSupport(seat);
# 3554|       }
# 3555|   }

Error: CPPCHECK_WARNING (CWE-457): [#def36]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3572: error[uninitvar]: Uninitialized variables: tool.instance_id, tool.info, tool.focus, tool.wltool, tool.proximity_serial, tool.frame, tool.cursor_state, tool.link
# 3570|           wl_list_for_each_safe (tool, temp, &seat->tablet.tool_list, link) {
# 3571|               // Remove all tools for this seat, sending PROXIMITY_OUT events.
# 3572|->             tablet_tool_handle_removed(tool, tool->wltool);
# 3573|           }
# 3574|       } else {

Error: CPPCHECK_WARNING (CWE-457): [#def37]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3621: error[uninitvar]: Uninitialized variable: seat->keyboard.focus
# 3619|       wl_list_for_each (seat, &display->seat_list, link)
# 3620|       {
# 3621|->         if (seat->keyboard.focus == window) {
# 3622|               keyboard_handle_leave(seat, seat->keyboard.wl_keyboard, 0, window->surface);
# 3623|           }

Error: CPPCHECK_WARNING (CWE-457): [#def38]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3632: error[uninitvar]: Uninitialized variable: tp->surface
# 3630|           SDL_WaylandTouchPoint *tp, *temp;
# 3631|           wl_list_for_each_safe (tp, temp, &seat->touch.points, link) {
# 3632|->             if (tp->surface == window->surface) {
# 3633|                   Wayland_SeatCancelTouch(seat, tp);
# 3634|               }

Error: CPPCHECK_WARNING (CWE-457): [#def39]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3639: error[uninitvar]: Uninitialized variable: tool->focus
# 3637|           SDL_WaylandPenTool *tool;
# 3638|           wl_list_for_each (tool, &seat->tablet.tool_list, link) {
# 3639|->             if (tool->focus == window) {
# 3640|                   tool->focus = NULL;
# 3641|                   Wayland_TabletToolUpdateCursor(tool);

Error: CPPCHECK_WARNING (CWE-457): [#def40]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3906: error[uninitvar]: Uninitialized variable: seat->pointer.focus
# 3904|       SDL_WaylandSeat *seat;
# 3905|       wl_list_for_each (seat, &display->seat_list, link) {
# 3906|->         if (!window || seat->pointer.focus == window) {
# 3907|               Wayland_SeatUpdatePointerGrab(seat);
# 3908|           }

Error: CPPCHECK_WARNING (CWE-457): [#def41]
SDL3-3.4.0/src/video/wayland/SDL_waylandevents.c:3916: error[uninitvar]: Uninitialized variable: seat->keyboard.focus
# 3914|       SDL_WaylandSeat *seat;
# 3915|       wl_list_for_each (seat, &display->seat_list, link) {
# 3916|->         if (!window || seat->keyboard.focus == window) {
# 3917|               Wayland_SeatUpdateKeyboardGrab(seat);
# 3918|           }

Error: CPPCHECK_WARNING (CWE-457): [#def42]
SDL3-3.4.0/src/video/wayland/SDL_waylandkeyboard.c:182: error[uninitvar]: Uninitialized variable: seat->keyboard.focus
#  180|           SDL_WaylandSeat *seat;
#  181|           wl_list_for_each (seat, &display->seat_list, link) {
#  182|->             if (seat->keyboard.focus == wind) {
#  183|                   Wayland_SeatUpdateTextInput(seat);
#  184|               }

Error: CPPCHECK_WARNING (CWE-457): [#def43]
SDL3-3.4.0/src/video/wayland/SDL_waylandkeyboard.c:203: error[uninitvar]: Uninitialized variable: seat->keyboard.focus
#  201|   
#  202|           wl_list_for_each (seat, &display->seat_list, link) {
#  203|->             if (seat->keyboard.focus == wind) {
#  204|                   Wayland_SeatUpdateTextInput(seat);
#  205|               }

Error: CPPCHECK_WARNING (CWE-457): [#def44]
SDL3-3.4.0/src/video/wayland/SDL_waylandkeyboard.c:225: error[uninitvar]: Uninitialized variable: seat->text_input.zwp_text_input
#  223|   
#  224|           wl_list_for_each (seat, &internal->seat_list, link) {
#  225|->             if (seat->text_input.zwp_text_input && seat->keyboard.focus == wind) {
#  226|                   const SDL_Rect scaled_rect = {
#  227|                       (int)SDL_floor(window->text_input_rect.x / wind->pointer_scale.x),

Error: CPPCHECK_WARNING (CWE-457): [#def45]
SDL3-3.4.0/src/video/wayland/SDL_waylandkeyboard.c:270: error[uninitvar]: Uninitialized variable: seat->keyboard.wl_keyboard
#  268|       // Check for at least one keyboard object on one seat.
#  269|       wl_list_for_each (seat, &internal->seat_list, link) {
#  270|->         if (seat->keyboard.wl_keyboard) {
#  271|               haskeyboard = true;
#  272|               break;

Error: CPPCHECK_WARNING (CWE-457): [#def46]
SDL3-3.4.0/src/video/wayland/SDL_waylandmouse.c:900: error[uninitvar]: Uninitialized variable: seat->pointer.current_cursor
#  898|       wl_list_for_each (seat, &video_data->seat_list, link)
#  899|       {
#  900|->         if (seat->pointer.current_cursor == d) {
#  901|               Wayland_CursorStateDestroyFrameCallback(&seat->pointer.cursor_state);
#  902|   

Error: CPPCHECK_WARNING (CWE-457): [#def47]
SDL3-3.4.0/src/video/wayland/SDL_waylandmouse.c:914: error[uninitvar]: Uninitialized variables: c.size, c.node
#  912|           Wayland_CachedSystemCursor *c, *temp;
#  913|           wl_list_for_each_safe(c, temp, &d->cursor_data.system.cursor_buffer_cache, node) {
#  914|->             SDL_free(c);
#  915|           }
#  916|       } else {

Error: CPPCHECK_WARNING (CWE-457): [#def48]
SDL3-3.4.0/src/video/wayland/SDL_waylandmouse.c:1038: error[ctuuninitvar]: Using argument state that points at uninitialized variable tool->cursor_state
# 1036|   
# 1037|       // Stop the frame callback for old animated cursors.
# 1038|->     if (cursor_data != state->current_cursor) {
# 1039|           Wayland_CursorStateDestroyFrameCallback(state);
# 1040|       }

Error: CPPCHECK_WARNING (CWE-457): [#def49]
SDL3-3.4.0/src/video/wayland/SDL_waylandmouse.c:1168: error[uninitvar]: Uninitialized variable: seat->pointer.wl_pointer
# 1166|   
# 1167|       wl_list_for_each (seat, &d->seat_list, link) {
# 1168|->         obj.wl_pointer = seat->pointer.wl_pointer;
# 1169|           obj.is_pointer = true;
# 1170|           if (mouse->focus && mouse->focus->internal == seat->pointer.focus) {

Error: CPPCHECK_WARNING (CWE-457): [#def50]
SDL3-3.4.0/src/video/wayland/SDL_waylandmouse.c:1178: error[uninitvar]: Uninitialized variable: tool->wltool
# 1176|           SDL_WaylandPenTool *tool;
# 1177|           wl_list_for_each(tool, &seat->tablet.tool_list, link) {
# 1178|->             obj.wl_tool = tool->wltool;
# 1179|               obj.is_pointer = false;
# 1180|   

Error: CPPCHECK_WARNING (CWE-457): [#def51]
SDL3-3.4.0/src/video/wayland/SDL_waylandmouse.c:1259: error[uninitvar]: Uninitialized variable: seat->pointer.focus
# 1257|       if (d->wp_pointer_warp_v1 || d->pointer_constraints) {
# 1258|           wl_list_for_each (seat, &d->seat_list, link) {
# 1259|->             if (wind == seat->pointer.focus) {
# 1260|                   Wayland_SeatWarpMouse(seat, wind, x, y);
# 1261|               }

Error: CPPCHECK_WARNING (CWE-457): [#def52]
SDL3-3.4.0/src/video/wayland/SDL_waylandmouse.c:1278: error[uninitvar]: Uninitialized variable: seat->pointer.focus
# 1276|       if (d->wp_pointer_warp_v1 || d->pointer_constraints) {
# 1277|           wl_list_for_each (seat, &d->seat_list, link) {
# 1278|->             SDL_WindowData *wind = seat->pointer.focus ? seat->pointer.focus : seat->keyboard.focus;
# 1279|   
# 1280|               // If the client wants the coordinates warped to within a focused window, just convert the coordinates to relative.

Error: CPPCHECK_WARNING (CWE-457): [#def53]
SDL3-3.4.0/src/video/wayland/SDL_waylandmouse.c:1349: error[uninitvar]: Uninitialized variable: seat->pointer.buttons_pressed
# 1347|           // Query the buttons from the seats directly, as this may be called from within a hit test handler.
# 1348|           wl_list_for_each (seat, &video_data->seat_list, link) {
# 1349|->             result |= seat->pointer.buttons_pressed;
# 1350|           }
# 1351|       } else {

Error: CPPCHECK_WARNING (CWE-457): [#def54]
SDL3-3.4.0/src/video/wayland/SDL_waylandvideo.c:1376: error[uninitvar]: Uninitialized variable: seat->registry_id
# 1374|       wl_list_for_each_safe (seat, temp, &d->seat_list, link)
# 1375|       {
# 1376|->         if (seat->registry_id == id) {
# 1377|               if (seat->keyboard.wl_keyboard) {
# 1378|                   SDL_RemoveKeyboard(seat->keyboard.sdl_id);

Error: CPPCHECK_WARNING (CWE-457): [#def55]
SDL3-3.4.0/src/video/wayland/SDL_waylandvideo.c:1553: error[uninitvar]: Uninitialized variables: seat.display, seat.wl_seat, seat.data_device, seat.primary_selection_device, seat.name, seat.link, seat.last_implicit_grab_serial, seat.registry_id, seat.keyboard, seat.pointer, seat.touch, seat.text_input, seat.tablet
# 1551|   
# 1552|       wl_list_for_each_safe (seat, tmp, &data->seat_list, link) {
# 1553|->         Wayland_SeatDestroy(seat, true);
# 1554|       }
# 1555|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def56]
SDL3-3.4.0/test/checkkeys.c:102:11: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
SDL3-3.4.0/test/checkkeys.c:446:5: enter_function: entry to ‘main’
SDL3-3.4.0/test/checkkeys.c:457:8: branch_false: following ‘false’ branch...
SDL3-3.4.0/test/checkkeys.c:460:5: branch_false: ...to here
SDL3-3.4.0/test/checkkeys.c:463:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/checkkeys.c:468:5: branch_true: ...to here
SDL3-3.4.0/test/checkkeys.c:471:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/checkkeys.c:476:55: branch_true: ...to here
SDL3-3.4.0/test/checkkeys.c:477:8: branch_false: following ‘false’ branch...
SDL3-3.4.0/test/checkkeys.c:477:8: branch_false: ...to here
SDL3-3.4.0/test/checkkeys.c:511:5: call_function: calling ‘PrintModifierState’ from ‘main’
#  100|   
#  101|       va_start(ap, fmt);
#  102|->     len = SDL_vsnprintf(*text, *maxlen, fmt, ap);
#  103|       if (len > 0) {
#  104|           *text += len;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def57]
SDL3-3.4.0/test/checkkeys.c:353:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
SDL3-3.4.0/test/checkkeys.c:446:5: enter_function: entry to ‘main’
SDL3-3.4.0/test/checkkeys.c:457:8: branch_false: following ‘false’ branch...
SDL3-3.4.0/test/checkkeys.c:460:5: branch_false: ...to here
SDL3-3.4.0/test/checkkeys.c:463:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/checkkeys.c:468:5: branch_true: ...to here
SDL3-3.4.0/test/checkkeys.c:471:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/checkkeys.c:476:55: branch_true: ...to here
SDL3-3.4.0/test/checkkeys.c:477:8: branch_false: following ‘false’ branch...
SDL3-3.4.0/test/checkkeys.c:477:8: branch_false: ...to here
SDL3-3.4.0/test/checkkeys.c:519:12: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/checkkeys.c:520:9: branch_true: ...to here
SDL3-3.4.0/test/checkkeys.c:520:9: call_function: calling ‘loop’ from ‘main’
#  351|           {
#  352|               TextWindowState *windowstate = GetTextWindowStateForWindowID(event.edit.windowID);
#  353|->             if (windowstate->edit_text) {
#  354|                   SDL_free(windowstate->edit_text);
#  355|                   windowstate->edit_text = NULL;

Error: CPPCHECK_WARNING (CWE-758): [#def58]
SDL3-3.4.0/test/testatomic.c:110: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  108|   enum
#  109|   {
#  110|->     CountTo_GreaterThanZero = CountTo > 0,
#  111|   };
#  112|   SDL_COMPILE_TIME_ASSERT(size, CountTo_GreaterThanZero); /* check for rollover */

Error: CPPCHECK_WARNING (CWE-758): [#def59]
SDL3-3.4.0/test/testatomic.c:121: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  119|   static int SDLCALL adder(void *junk)
#  120|   {
#  121|->     unsigned long N = NInter;
#  122|       SDL_Log("Thread subtracting %d %lu times", CountInc, N);
#  123|       while (N--) {

Error: CPPCHECK_WARNING (CWE-758): [#def60]
SDL3-3.4.0/test/testatomic.c:187: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  185|   
#  186|       SDL_Log("Verify maximum value");
#  187|->     SDL_SetAtomicInt(&good, CountTo);
#  188|       v = SDL_GetAtomicInt(&good);
#  189|       SDL_assert(v == CountTo);

Error: CPPCHECK_WARNING (CWE-758): [#def61]
SDL3-3.4.0/test/testatomic.c:189: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  187|       SDL_SetAtomicInt(&good, CountTo);
#  188|       v = SDL_GetAtomicInt(&good);
#  189|->     SDL_assert(v == CountTo);
#  190|   
#  191|       SDL_Log("Test compare and exchange");

Error: CPPCHECK_WARNING (CWE-758): [#def62]
SDL3-3.4.0/test/testatomic.c:196: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  194|       SDL_assert(!b); /* no swap since CountTo!=500 */
#  195|       v = SDL_GetAtomicInt(&good);
#  196|->     SDL_assert(v == CountTo); /* ensure no swap */
#  197|   
#  198|       b = SDL_CompareAndSwapAtomicInt(&good, CountTo, 44);

Error: CPPCHECK_WARNING (CWE-758): [#def63]
SDL3-3.4.0/test/testatomic.c:198: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  196|       SDL_assert(v == CountTo); /* ensure no swap */
#  197|   
#  198|->     b = SDL_CompareAndSwapAtomicInt(&good, CountTo, 44);
#  199|       SDL_assert(!!b); /* will swap */
#  200|       v = SDL_GetAtomicInt(&good);

Error: CPPCHECK_WARNING (CWE-758): [#def64]
SDL3-3.4.0/test/testatomic.c:233: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  231|   
#  232|       SDL_Log("Reset before count down test");
#  233|->     SDL_SetAtomicInt(&good, CountTo);
#  234|       v = SDL_GetAtomicInt(&good);
#  235|       SDL_assert(v == CountTo);

Error: CPPCHECK_WARNING (CWE-758): [#def65]
SDL3-3.4.0/test/testatomic.c:235: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  233|       SDL_SetAtomicInt(&good, CountTo);
#  234|       v = SDL_GetAtomicInt(&good);
#  235|->     SDL_assert(v == CountTo);
#  236|   
#  237|       bad = CountTo;

Error: CPPCHECK_WARNING (CWE-758): [#def66]
SDL3-3.4.0/test/testatomic.c:237: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  235|       SDL_assert(v == CountTo);
#  236|   
#  237|->     bad = CountTo;
#  238|       SDL_assert(bad == CountTo);
#  239|   

Error: CPPCHECK_WARNING (CWE-758): [#def67]
SDL3-3.4.0/test/testatomic.c:238: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  236|   
#  237|       bad = CountTo;
#  238|->     SDL_assert(bad == CountTo);
#  239|   
#  240|       SDL_Log("Counting down from %d, Expect %d remaining", CountTo, Expect);

Error: CPPCHECK_WARNING (CWE-758): [#def68]
SDL3-3.4.0/test/testatomic.c:240: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  238|       SDL_assert(bad == CountTo);
#  239|   
#  240|->     SDL_Log("Counting down from %d, Expect %d remaining", CountTo, Expect);
#  241|       runAdder();
#  242|   

Error: CPPCHECK_WARNING (CWE-758): [#def69]
SDL3-3.4.0/test/testatomic.c:245: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  243|       v = SDL_GetAtomicInt(&good);
#  244|       SDL_Log("Atomic %d Non-Atomic %d", v, bad);
#  245|->     SDL_assert(v == Expect);
#  246|       /* We can't guarantee that bad != Expect, this would happen on a single core system, for example. */
#  247|       /*SDL_assert(bad != Expect);*/

Error: GCC_ANALYZER_WARNING (CWE-404): [#def70]
SDL3-3.4.0/test/testaudio.c:140:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
SDL3-3.4.0/test/testaudio.c:1121:15: enter_function: entry to ‘SDL_AppEvent’
SDL3-3.4.0/test/testaudio.c:1130:21: call_function: calling ‘UpdateMouseOver’ from ‘SDL_AppEvent’
#  138|       va_list ap;
#  139|       va_start(ap, fmt);
#  140|->     SDL_vasprintf(&title, fmt, ap);
#  141|       va_end(ap);
#  142|   

Error: GCC_ANALYZER_WARNING (CWE-674): [#def71]
SDL3-3.4.0/test/testaudio.c:502:13: warning[-Wanalyzer-infinite-recursion]: infinite recursion
SDL3-3.4.0/test/testaudio.c:953:13: enter_function: entry to ‘PhysicalDeviceThing_ondrop’
SDL3-3.4.0/test/testaudio.c:955:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/testaudio.c:956:13: branch_true: ...to here
SDL3-3.4.0/test/testaudio.c:956:12: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/testaudio.c:957:13: branch_true: ...to here
SDL3-3.4.0/test/testaudio.c:957:13: call_function: calling ‘TrashThing’ from ‘PhysicalDeviceThing_ondrop’
#  500|           next = i->next;
#  501|           if (i->line_connected_to == thing) {
#  502|->             TrashThing(i);
#  503|               next = things;  /* start over in case this blew up the list. */
#  504|           }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def72]
SDL3-3.4.0/test/testaudiostreamdynamicresample.c:99:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
SDL3-3.4.0/test/testaudiostreamdynamicresample.c:201:13: enter_function: entry to ‘loop’
SDL3-3.4.0/test/testaudiostreamdynamicresample.c:298:17: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/testaudiostreamdynamicresample.c:300:30: branch_true: ...to here
SDL3-3.4.0/test/testaudiostreamdynamicresample.c:305:21: branch_true: following ‘true’ branch (when ‘j != 3’)...
SDL3-3.4.0/test/testaudiostreamdynamicresample.c:309:13: branch_true: ...to here
SDL3-3.4.0/test/testaudiostreamdynamicresample.c:319:13: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/testaudiostreamdynamicresample.c:320:52: branch_true: ...to here
SDL3-3.4.0/test/testaudiostreamdynamicresample.c:319:13: call_function: calling ‘draw_textf’ from ‘loop’
#   97|   
#   98|       va_start(ap, fmt);
#   99|->     SDL_vsnprintf(text, SDL_arraysize(text), fmt, ap);
#  100|       va_end(ap);
#  101|   

Error: GCC_ANALYZER_WARNING (CWE-126): [#def73]
SDL3-3.4.0/test/testautomation_intrinsics.c:261:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
SDL3-3.4.0/test/testautomation_intrinsics.c:514:20: enter_function: entry to ‘intrinsics_testSSE4_2’
SDL3-3.4.0/test/testautomation_intrinsics.c:532:25: branch_true: following ‘true’ branch (when ‘i != 3’)...
SDL3-3.4.0/test/testautomation_intrinsics.c:533:33: branch_true: ...to here
SDL3-3.4.0/test/testautomation_intrinsics.c:533:33: call_function: calling ‘calculate_crc32c_sse4_2’ from ‘intrinsics_testSSE4_2’
#  259|   #if defined(__x86_64__) || defined(_M_X64)
#  260|       for (; len >= 8; len -= 8, text += 8) {
#  261|->         crc32c = (Uint32)_mm_crc32_u64(crc32c, *(Sint64*)text);
#  262|       }
#  263|       if (len >= 4) {

Error: GCC_ANALYZER_WARNING (CWE-126): [#def74]
SDL3-3.4.0/test/testautomation_intrinsics.c:264:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
SDL3-3.4.0/test/testautomation_intrinsics.c:514:20: enter_function: entry to ‘intrinsics_testSSE4_2’
SDL3-3.4.0/test/testautomation_intrinsics.c:532:25: branch_true: following ‘true’ branch (when ‘i != 3’)...
SDL3-3.4.0/test/testautomation_intrinsics.c:533:33: branch_true: ...to here
SDL3-3.4.0/test/testautomation_intrinsics.c:533:33: call_function: calling ‘calculate_crc32c_sse4_2’ from ‘intrinsics_testSSE4_2’
#  262|       }
#  263|       if (len >= 4) {
#  264|->         crc32c = (Uint32)_mm_crc32_u32(crc32c, *(Sint32*)text);
#  265|           len -= 4;
#  266|           text += 4;

Error: CPPCHECK_WARNING (CWE-457): [#def75]
SDL3-3.4.0/test/testautomation_rect.c:1498: error[uninitvar]: Uninitialized variable: points
# 1496|       anyEnclosed = SDL_GetRectEnclosingPoints((SDL_Point *)NULL, 1, &clip, &result);
# 1497|       SDLTest_AssertCheck(anyEnclosed == false, "Check that functions returns false when 1st parameter is NULL");
# 1498|->     anyEnclosed = SDL_GetRectEnclosingPoints(points, 0, &clip, &result);
# 1499|       SDLTest_AssertCheck(anyEnclosed == false, "Check that functions returns false when 2nd parameter is 0");
# 1500|       count = SDLTest_RandomIntegerInRange(-100, -1);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def76]
SDL3-3.4.0/test/testcolorspace.c:177:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
SDL3-3.4.0/test/testcolorspace.c:176:5: acquire_resource: ‘va_start’ called here
SDL3-3.4.0/test/testcolorspace.c:177:5: throw: if ‘SDL_vasprintf’ throws an exception...
SDL3-3.4.0/test/testcolorspace.c:177:5: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  175|       va_list ap;
#  176|       va_start(ap, fmt);
#  177|->     SDL_vasprintf(&text, fmt, ap);
#  178|       va_end(ap);
#  179|   

Error: GCC_ANALYZER_WARNING (CWE-479): [#def77]
SDL3-3.4.0/test/testlock.c:70:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
SDL3-3.4.0/test/testlock.c:79:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/testlock.c:80:15: branch_true: ...to here
SDL3-3.4.0/test/testlock.c:54:13: enter_function: entry to ‘closemutex’
SDL3-3.4.0/test/testlock.c:60:8: branch_false: following ‘false’ branch...
SDL3-3.4.0/test/testlock.c:67:5: branch_false: ...to here
SDL3-3.4.0/test/testlock.c:69:8: branch_true: following ‘true’ branch (when ‘sig != 0’)...
SDL3-3.4.0/test/testlock.c:70:9: branch_true: ...to here
SDL3-3.4.0/test/testlock.c:70:9: danger: call to ‘exit’ from within signal handler
#   68|       /* Let 'main()' return normally */
#   69|       if (sig != 0) {
#   70|->         exit(sig);
#   71|       }
#   72|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def78]
SDL3-3.4.0/test/testprocess.c:56:23: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
SDL3-3.4.0/test/testprocess.c:50:5: acquire_resource: ‘va_start’ called here
SDL3-3.4.0/test/testprocess.c:53:12: branch_false: following ‘false’ branch (when ‘keyN’ is non-NULL)...
SDL3-3.4.0/test/testprocess.c:56:16: branch_false: ...to here
SDL3-3.4.0/test/testprocess.c:56:23: throw: if ‘SDL_strdup’ throws an exception...
SDL3-3.4.0/test/testprocess.c:56:23: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   54|               break;
#   55|           }
#   56|->         result[i++] = SDL_strdup(keyN);
#   57|       }
#   58|       va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def79]
SDL3-3.4.0/test/testvulkan.c:721:9: warning[-Wanalyzer-jump-through-null]: jump through null pointer
SDL3-3.4.0/test/testvulkan.c:1095:5: enter_function: entry to ‘main’
SDL3-3.4.0/test/testvulkan.c:1106:8: branch_false: following ‘false’ branch...
SDL3-3.4.0/test/testvulkan.c:1111:5: branch_false: ...to here
SDL3-3.4.0/test/testvulkan.c:1114:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/testvulkan.c:1129:5: call_function: calling ‘initVulkan’ from ‘main’
#  719|   {
#  720|       if (vulkanContext->swapchain) {
#  721|->         vkDestroySwapchainKHR(vulkanContext->device, vulkanContext->swapchain, NULL);
#  722|           vulkanContext->swapchain = VK_NULL_HANDLE;
#  723|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def80]
SDL3-3.4.0/test/testvulkan.c:731:9: warning[-Wanalyzer-jump-through-null]: jump through null pointer
SDL3-3.4.0/test/testvulkan.c:1095:5: enter_function: entry to ‘main’
SDL3-3.4.0/test/testvulkan.c:1106:8: branch_false: following ‘false’ branch...
SDL3-3.4.0/test/testvulkan.c:1111:5: branch_false: ...to here
SDL3-3.4.0/test/testvulkan.c:1114:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/testvulkan.c:1129:5: call_function: calling ‘initVulkan’ from ‘main’
#  729|   {
#  730|       if (vulkanContext->commandBuffers) {
#  731|->         vkFreeCommandBuffers(vulkanContext->device,
#  732|                                vulkanContext->commandPool,
#  733|                                vulkanContext->swapchainImageCount,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
SDL3-3.4.0/test/testvulkan.c:743:9: warning[-Wanalyzer-jump-through-null]: jump through null pointer
SDL3-3.4.0/test/testvulkan.c:1095:5: enter_function: entry to ‘main’
SDL3-3.4.0/test/testvulkan.c:1106:8: branch_false: following ‘false’ branch...
SDL3-3.4.0/test/testvulkan.c:1111:5: branch_false: ...to here
SDL3-3.4.0/test/testvulkan.c:1114:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/testvulkan.c:1129:5: call_function: calling ‘initVulkan’ from ‘main’
#  741|   {
#  742|       if (vulkanContext->commandPool) {
#  743|->         vkDestroyCommandPool(vulkanContext->device, vulkanContext->commandPool, NULL);
#  744|       }
#  745|       vulkanContext->commandPool = VK_NULL_HANDLE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def82]
SDL3-3.4.0/test/testvulkan.c:822:9: warning[-Wanalyzer-jump-through-null]: jump through null pointer
SDL3-3.4.0/test/testvulkan.c:1095:5: enter_function: entry to ‘main’
SDL3-3.4.0/test/testvulkan.c:1106:8: branch_false: following ‘false’ branch...
SDL3-3.4.0/test/testvulkan.c:1111:5: branch_false: ...to here
SDL3-3.4.0/test/testvulkan.c:1114:8: branch_true: following ‘true’ branch...
SDL3-3.4.0/test/testvulkan.c:1129:5: call_function: calling ‘initVulkan’ from ‘main’
#  820|   
#  821|       for (i = 0; i < vulkanContext->swapchainImageCount; i++) {
#  822|->         vkDestroyFence(vulkanContext->device, vulkanContext->fences[i], NULL);
#  823|       }
#  824|       SDL_free(vulkanContext->fences);

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
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-167.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameSDL3-3.2.20-1.fc43
diffbase-store-results-to/tmp/tmpaqptmgsc/SDL3-3.2.20-1.fc43.tar.xz
diffbase-time-created2026-01-08 15:17:42
diffbase-time-finished2026-01-08 15:26:34
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpaqptmgsc/SDL3-3.2.20-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpaqptmgsc/SDL3-3.2.20-1.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-167.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-nameSDL3-3.4.0-1.fc44
store-results-to/tmp/tmp0v8lh_tj/SDL3-3.4.0-1.fc44.tar.xz
time-created2026-01-08 15:26:57
time-finished2026-01-08 15:36:58
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp0v8lh_tj/SDL3-3.4.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp0v8lh_tj/SDL3-3.4.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9