Extensions/Layers: Potential memory over-read? #21
aquilinum0
started this conversation in
General
Replies: 0 comments
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
I may have missed something, but while investigating how you implemented sending extension/layer data to vkCreateInstance when I noticed a potential memory bug
alimer/src/Alimer.Graphics/Vulkan/Ut8StringArray.cs
Line 28 in f7df7f3
NativeMemory.Alloc
does not zero bytes after allocation. Writingn - 1
bytes here doesn't guarantee a\0
terminating characterYou could use
NativeMemory.AllocZeroed
or set the last byte to be\0
Beta Was this translation helpful? Give feedback.
All reactions