mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +08:00
camerad: fix null dereference in camera_bufs_raw when accessing cur_camera_buf (#34635)
Fix null dereference in camera_bufs_raw
This commit is contained in:
@@ -57,7 +57,9 @@ bool CameraBuf::acquire() {
|
||||
}
|
||||
|
||||
cur_frame_data = frame_metadata[cur_buf_idx];
|
||||
cur_camera_buf = &camera_bufs_raw[cur_buf_idx];
|
||||
if (camera_bufs_raw) {
|
||||
cur_camera_buf = &camera_bufs_raw[cur_buf_idx];
|
||||
}
|
||||
|
||||
cur_yuv_buf = vipc_server->get_buffer(stream_type, cur_buf_idx);
|
||||
cur_frame_data.processing_time = (double)(cur_frame_data.timestamp_end_of_isp - cur_frame_data.timestamp_eof)*1e-9;
|
||||
|
||||
Reference in New Issue
Block a user