Skip to content

Phase 15.6: ISPC SoA packing may overflow uint32_t width*height #33

Description

@Cle2ment

Problem

CPUBackend::Render() computes pixelCount = width * height (both uint32_t). If width × height > UINT32_MAX (e.g., width > 65535), the multiplication overflows, resize() allocates fewer elements than expected, and the subsequent loop writes out of bounds.

Same risk exists in OnResize for m_AccumulationData.resize(width * height).

Fix

Cast to size_t before multiplication, or add an explicit overflow check.

Files

  • RayTracing/src/CPUBackend.cpp

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions