We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
calloc
1 parent 6319b68 commit 299451cCopy full SHA for 299451c
1 file changed
src/detection/gpu/gpu_drm.c
@@ -181,7 +181,7 @@ const char* ffDrmDetectI915(FFGPUResult* gpu, int fd) {
181
.items_ptr = (uintptr_t) &queryItem,
182
.num_items = 1,
183
};
184
- if (ioctl(fd, DRM_IOCTL_I915_QUERY, &query) >= 0) {
+ if (ioctl(fd, DRM_IOCTL_I915_QUERY, &query) >= 0 && queryItem.length > 0) { // #2259
185
FF_AUTO_FREE uint8_t* buffer = calloc(1, (size_t) queryItem.length);
186
queryItem.data_ptr = (uintptr_t) buffer;
187
if (ioctl(fd, DRM_IOCTL_I915_QUERY, &query) >= 0) {
0 commit comments