radeon: return EINVAL for 0 length buffers.
Signed-off-by: Robert Noland <rnoland@2hip.net>
This commit is contained in:
committed by
Alex Deucher
parent
22a0029a68
commit
e5d6450c2c
@@ -710,6 +710,10 @@ int radeon_bo_legacy_validate(struct radeon_bo *bo,
|
||||
bo, bo->size, bo_legacy->map_count);
|
||||
return -EINVAL;
|
||||
}
|
||||
if(bo->size == 0) {
|
||||
fprintf(stderr, "bo(%p) has size 0.\n", bo);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (bo_legacy->static_bo || bo_legacy->validated) {
|
||||
*soffset = bo_legacy->offset;
|
||||
*eoffset = bo_legacy->offset + bo->size;
|
||||
|
||||
Reference in New Issue
Block a user