Skip to content

Commit

Permalink
Avoid UBSAN false positive
Browse files Browse the repository at this point in the history
UBSAN: array-index-out-of-bounds in src/ocf_request.c:230:44
index 1 is out of range for type 'ocf_map_info [*]'

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
  • Loading branch information
robertbaldyga committed Oct 2, 2024
1 parent 630748a commit 75fb6a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ocf_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ struct ocf_request *ocf_req_new(ocf_queue_t queue, ocf_core_t core,

if (map_allocated) {
req->map = req->__map;
req->alock_status = (uint8_t*)&req->__map[core_line_count];
req->alock_status = (uint8_t*)&req->map[core_line_count];
req->alloc_core_line_count = core_line_count;
} else {
req->alloc_core_line_count = 1;
Expand Down

0 comments on commit 75fb6a5

Please sign in to comment.