egl-wayland-1.1.19-3.fc43

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream-server.c:245:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream-server.c:234:1: enter_function: entry to ‘handle_swap_interval’
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream-server.c:242:9: call_function: calling ‘wl_eglstream_display_get_stream’ from ‘handle_swap_interval’
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream-server.c:242:9: return_function: returning to ‘handle_swap_interval’ from ‘wl_eglstream_display_get_stream’
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream-server.c:245:9: danger: dereference of NULL ‘wl_eglstream_display_get_stream(wl_resource_get_user_data(displayResource), streamResource)’
#  243|       (void) client;
#  244|   
#  245|->     if (wlEglStreamSwapIntervalCallback(wlStreamDpy->data,
#  246|                                           wlStream->eglStream,
#  247|                                           &interval) == EGL_BAD_MATCH) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:160:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘attribs2’
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:51:8: branch_true: following ‘true’ branch (when ‘attribs’ is non-NULL)...
 branch_true: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:54:20: branch_false: following ‘false’ branch (when ‘resource’ is NULL)...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:59:57: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:72:8: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:82:5: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:85:8: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:88:9: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:91:8: branch_false: following ‘false’ branch (when ‘err == 12288’)...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:95:16: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:96:8: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:101:9: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:101:8: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:102:9: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:101:9: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:107:9: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:107:8: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:139:13: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:139:12: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:140:13: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:139:13: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:141:13: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:139:13: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:142:14: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:157:33: acquire_memory: this call could return NULL
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglstream.c:160:9: danger: ‘attribs2’ could be NULL: unchecked value from [(25)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/24)
#  158|   
#  159|           nAttribs = 0;
#  160|->         attribs2[nAttribs++] = EGL_STREAM_TYPE_NV;
#  161|           attribs2[nAttribs++] = EGL_STREAM_CROSS_PROCESS_NV;
#  162|           attribs2[nAttribs++] = EGL_STREAM_PROTOCOL_NV;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:408:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘eventItem’
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:385:8: branch_false: following ‘false’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:389:5: branch_false: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:398:8: branch_true: following ‘true’ branch (when ‘presentInfo’ is non-NULL)...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:400:9: branch_true: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:400:9: branch_true: following ‘true’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:402:13: branch_true: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:402:12: branch_true: following ‘true’ branch...
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:405:47: branch_true: ...to here
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:407:43: acquire_memory: this call could return NULL
egl-wayland-1.1.19/redhat-linux-build/../src/wayland-eglswap.c:408:13: danger: ‘eventItem’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  406|   
#  407|               struct EventItem *eventItem = malloc(sizeof(struct EventItem));
#  408|->             eventItem->capturedId = presentId;
#  409|               eventItem->presentInfo = presentInfo;
#  410|               eventItem->surface = surface;

Error: CPPCHECK_WARNING (CWE-457): [#def4]
egl-wayland-1.1.19/src/wayland-egldevice.c:126: error[uninitvar]: Uninitialized variable: devDpy->data
#  124|       WlEglDeviceDpy *devDpy, *devNext;
#  125|       wl_list_for_each_safe(devDpy, devNext, &data->deviceDpyList, link) {
#  126|->         assert (devDpy->data == data);
#  127|           wlFreeInternalDisplay(devDpy);
#  128|       }

Error: CPPCHECK_WARNING (CWE-457): [#def5]
egl-wayland-1.1.19/src/wayland-egldisplay.c:1464: error[uninitvar]: Uninitialized variables: dpy.devDpy, dpy.supports_native_fence_sync, dpy.supports_explicit_sync, dpy.ownNativeDpy, dpy.nativeDpy, dpy.wlRegistry, dpy.wlStreamDpy, dpy.wlStreamCtl, dpy.wlDmaBuf, dpy.wlDrmSyncobj, dpy.wlStreamCtlVer, dpy.wpPresentation, dpy.wlEventQueue, dpy.caps, dpy.data, dpy.drmFd, dpy.useInitRefCount, dpy.requestedDevice, dpy.initCount, dpy.mutex, dpy.refCount, dpy.wlEglSurfaceList, dpy.link, dpy.formatSet, dpy.dmaBufProtocolVersion, dpy.defaultFeedback, dpy.primeRenderOffload, dpy.extens [...]
# 1462|   
# 1463|       wl_list_for_each(dpy, &wlEglDisplayList, link) {
# 1464|->         if (dpy == display) {
# 1465|               return EGL_TRUE;
# 1466|           }
egl-wayland-1.1.19/src/wayland-egldisplay.c:1464: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-457): [#def6]
egl-wayland-1.1.19/src/wayland-egldisplay.c:1684: error[uninitvar]: Uninitialized variable: display->data
# 1682|   
# 1683|       wl_list_for_each_safe(display, next, &wlEglDisplayList, link) {
# 1684|->         if (display->data == data) {
# 1685|               pthread_mutex_lock(&display->mutex);
# 1686|               res = terminateDisplay(display, EGL_TRUE) && res;

Error: CPPCHECK_WARNING (CWE-457): [#def7]
egl-wayland-1.1.19/src/wayland-eglstream-server.c:380: error[uninitvar]: Uninitialized variable: wlDisplay->eglDisplay
#  378|   
#  379|       wl_list_for_each(wlDisplay, &wlStreamDpyList, link) {
#  380|->         if (wlDisplay->eglDisplay == eglDisplay) {
#  381|               return wlDisplay;
#  382|           }

Error: CPPCHECK_WARNING (CWE-457): [#def8]
egl-wayland-1.1.19/src/wayland-eglsurface.c:82: error[uninitvar]: Uninitialized variables: surf.wlEglDpy, surf.eglConfig, surf.attribs, surf.pendingSwapIntervalUpdate, surf.wlEglWin, surf.wlEglWinVer, surf.wlSurface, surf.width, surf.height, surf.dx, surf.dy, surf.ctx, surf.oldCtxList, surf.swapInterval, surf.fifoLength, surf.present_update_callback, surf.presentFeedbackQueue, surf.inFlightPresentFeedbackCount, surf.landedPresentFeedbackCount, surf.throttleCallback, surf.wlEventQueue, surf.wlBufferEventQueue, surf.bufferReleaseThreadId, surf.link, surf.isSurfaceProducer,  [...]
#   80|   
#   81|       wl_list_for_each(surf, &display->wlEglSurfaceList, link) {
#   82|->         if (surf == surface) {
#   83|               return EGL_TRUE;
#   84|           }
egl-wayland-1.1.19/src/wayland-eglsurface.c:82: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-457): [#def9]
egl-wayland-1.1.19/src/wayland-eglsurface.c:667: error[uninitvar]: Uninitialized variables: image.surface, image.eglImage, image.buffer, image.attached, image.acquiredLink, image.wlReleaseTimeline, image.drmSyncobjHandle, image.releasePending, image.releasePoint, image.acquireSync, image.destructionPending, image.link
#  665|           // them.
#  666|           wl_list_for_each_safe(image, next, &ctx->streamImages, link) {
#  667|->             destroy_stream_image(display, surface, image);
#  668|           }
#  669|   

Error: CPPCHECK_WARNING (CWE-457): [#def10]
egl-wayland-1.1.19/src/wayland-eglsurface.c:703: error[uninitvar]: Uninitialized variable: ctx->wlStreamResource
#  701|       /* Look for the surface context for the given buffer and destroy it */
#  702|       wl_list_for_each(ctx, &surface->oldCtxList, link) {
#  703|->         if (ctx->wlStreamResource == buffer) {
#  704|               destroy_surface_context(surface, ctx);
#  705|               wl_list_remove(&ctx->link);

Error: CPPCHECK_WARNING (CWE-457): [#def11]
egl-wayland-1.1.19/src/wayland-eglsurface.c:1450: error[uninitvar]: Uninitialized variable: image->eglImage
# 1448|       wl_list_for_each(image, &surface->ctx.streamImages, link) {
# 1449|           /* Safe only because the iteration is aborted by a break statement */
# 1450|->         if (image->eglImage == eglImage) {
# 1451|               destroy_stream_image(display, surface, image);
# 1452|               break;

Error: CPPCHECK_WARNING (CWE-457): [#def12]
egl-wayland-1.1.19/src/wayland-eglsurface.c:1468: error[uninitvar]: Uninitialized variables: image.surface, image.eglImage, image.buffer, image.attached, image.wlReleaseTimeline, image.drmSyncobjHandle, image.releasePending, image.releasePoint, image.acquireSync, image.destructionPending, image.link
# 1466|           wl_list_remove(&image->acquiredLink);
# 1467|           wl_list_init(&image->acquiredLink);
# 1468|->         return image;
# 1469|       }
# 1470|   

Error: CPPCHECK_WARNING (CWE-457): [#def13]
egl-wayland-1.1.19/src/wayland-eglsurface.c:2483: warning[uninitvar]: Uninitialized variables: surface.wlEglDpy, surface.eglConfig, surface.attribs, surface.pendingSwapIntervalUpdate, surface.wlEglWin, surface.wlEglWinVer, surface.wlSurface, surface.width, surface.height, surface.dx, surface.dy, surface.ctx, surface.oldCtxList, surface.swapInterval, surface.fifoLength, surface.present_update_callback, surface.presentFeedbackQueue, surface.inFlightPresentFeedbackCount, surface.landedPresentFeedbackCount, surface.throttleCallback, surface.wlEventQueue, surface.wlBufferEventQueu [...]
# 2481|       WlEglSurface *surface = (WlEglSurface*)eglSurface;
# 2482|   
# 2483|->     if (!wlEglIsWlEglSurfaceForDisplay(display, surface) ||
# 2484|           display != surface->wlEglDpy) {
# 2485|           return EGL_FALSE;
egl-wayland-1.1.19/src/wayland-eglsurface.c:2483: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-457): [#def14]
egl-wayland-1.1.19/src/wayland-eglsurface.c:2513: error[uninitvar]: Uninitialized variables: ctx.isOffscreen, ctx.eglSurface, ctx.eglStream, ctx.wlStreamResource, ctx.isAttached, ctx.useDamageThread, ctx.damageThreadId, ctx.damageThreadSync, ctx.damageThreadFlush, ctx.damageThreadShutdown, ctx.framesProduced, ctx.framesFinished, ctx.framesProcessed, ctx.streamImagesMutex, ctx.streamImages, ctx.acquiredImages, ctx.currentBuffer, ctx.link
# 2511|   
# 2512|           wl_list_for_each_safe(ctx, next, &surface->oldCtxList, link) {
# 2513|->             destroy_surface_context(surface, ctx);
# 2514|               wl_list_remove(&ctx->link);
# 2515|               free(ctx);

Error: CPPCHECK_WARNING (CWE-457): [#def15]
egl-wayland-1.1.19/src/wayland-eglsurface.c:2562: error[uninitvar]: Uninitialized variable: image->buffer
# 2560|            */
# 2561|           wl_list_for_each(image, &surface->ctx.streamImages, link) {
# 2562|->             if (image->buffer) {
# 2563|                   assert(image->attached);
# 2564|                   wl_buffer_destroy(image->buffer);

Error: CPPCHECK_WARNING (CWE-457): [#def16]
egl-wayland-1.1.19/src/wayland-eglsurface.c:3049: error[uninitvar]: Uninitialized variable: surface->wlEglDpy
# 3047|   
# 3048|       wl_list_for_each_safe(surface, next, &display->wlEglSurfaceList, link) {
# 3049|->         if (surface->wlEglDpy == display) {
# 3050|               res = wlEglDestroySurface(display, surface) && res;
# 3051|           }

Error: CPPCHECK_WARNING (CWE-476): [#def17]
egl-wayland-1.1.19/src/wayland-eglswap.c:408: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: eventItem
#  406|   
#  407|               struct EventItem *eventItem = malloc(sizeof(struct EventItem));
#  408|->             eventItem->capturedId = presentId;
#  409|               eventItem->presentInfo = presentInfo;
#  410|               eventItem->surface = surface;

Error: CPPCHECK_WARNING (CWE-476): [#def18]
egl-wayland-1.1.19/src/wayland-eglswap.c:409: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: eventItem
#  407|               struct EventItem *eventItem = malloc(sizeof(struct EventItem));
#  408|               eventItem->capturedId = presentId;
#  409|->             eventItem->presentInfo = presentInfo;
#  410|               eventItem->surface = surface;
#  411|   

Error: CPPCHECK_WARNING (CWE-476): [#def19]
egl-wayland-1.1.19/src/wayland-eglswap.c:410: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: eventItem
#  408|               eventItem->capturedId = presentId;
#  409|               eventItem->presentInfo = presentInfo;
#  410|->             eventItem->surface = surface;
#  411|   
#  412|               wl_proxy_set_queue((struct wl_proxy *)wrapper, surface->presentFeedbackQueue);

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-225.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameegl-wayland-1.1.19-3.fc43
store-results-to/tmp/tmp_zswb8iv/egl-wayland-1.1.19-3.fc43.tar.xz
time-created2025-04-25 12:21:12
time-finished2025-04-25 12:22:25
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp_zswb8iv/egl-wayland-1.1.19-3.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp_zswb8iv/egl-wayland-1.1.19-3.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9