Skip to content

Move GpuMat initialization to a more suitable scope.#4060

Open
cabranca wants to merge 1 commit intoopencv:4.xfrom
cabranca:fix-use-of-uninitialized-buffer-stride-variable
Open

Move GpuMat initialization to a more suitable scope.#4060
cabranca wants to merge 1 commit intoopencv:4.xfrom
cabranca:fix-use-of-uninitialized-buffer-stride-variable

Conversation

@cabranca
Copy link

@cabranca cabranca commented Dec 30, 2025

Fix #4059

I moved the initialization of the upscaled buffer to the scope where it's actually used, ensuring that the stride variable is properly initialized before access.

Pull Request Readiness Checklist

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undefined behavior in NvidiaOpticalFlowImpl_2

1 participant