+{ 87 + const_cast<gbm_bo*&>(from.buffer) = nullptr; 88 + const_cast<gbm_device*&>(from.device) = nullptr;
Seems like undefined behavior.
Use a unique_ptr with custom deleter instead and move the unique_ptrs on move constructor.
165 + memset(dest, 0, buffer_stride * (gbm_bo_get_height(buffer) - image_height));
"gbm_bo_get_height(buffer) - image_height" could be negative and implicitly converted to size_t (so a huge number - Needs a check.
« Back to merge proposal
+{ gbm_bo* &>(from. buffer) = nullptr; gbm_device* &>(from. device) = nullptr;
87 + const_cast<
88 + const_cast<
Seems like undefined behavior.
Use a unique_ptr with custom deleter instead and move the unique_ptrs on move constructor.
165 + memset(dest, 0, buffer_stride * (gbm_bo_ get_height( buffer) - image_height));
"gbm_bo_ get_height( buffer) - image_height" could be negative and implicitly converted to size_t (so a huge number - Needs a check.