Skip to content

Commit 20e5db9

Browse files
committed
fix: fix array bounds check failure in destroy_sccb_device
1.Fix array bounds check failure in destroy_sccb_device() when compile option is OPTIMIZATION_SIZE. 2.Update the component version and update the CHANGELOG.
1 parent 54c9344 commit 20e5db9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

esp_video/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.3.1
2+
- Fix array bounds check failure in destroy_sccb_device() when compile option is PTIMIZATION_SIZE
3+
14
## 1.3.0
25

36
- Add RISC-V software swap byte function for DVP video device

esp_video/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.3.0"
1+
version: "1.3.1"
22
description: A framework designed to support Linux V4L2, multiple cameras and video streaming.
33
targets:
44
- esp32p4

esp_video/src/esp_video_init.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,9 @@ static void destroy_sccb_device(esp_sccb_io_handle_t handle, esp_video_init_sccb
293293
mark[i2c_port].handle = NULL;
294294

295295
s_sensor_sccb_mask[i2c_port].handle = NULL;
296-
s_sensor_sccb_mask[i2c_port].sccb_io[0] = NULL;
297-
s_sensor_sccb_mask[i2c_port].sccb_io[1] = NULL;
296+
for (int j = 0; j < ESP_VIDEO_INIT_DEV_NUMS; j++) {
297+
s_sensor_sccb_mask[i2c_port].sccb_io[j] = NULL;
298+
}
298299
}
299300
}
300301
} else {

0 commit comments

Comments
 (0)