From 024d66f92936cd13857afbbadfd6ac800948f764 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Thu, 4 Jun 2020 14:52:53 +0300 Subject: [PATCH] Update ov7725.c --- sensors/ov7725.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sensors/ov7725.c b/sensors/ov7725.c index 228906f..bb31573 100755 --- a/sensors/ov7725.c +++ b/sensors/ov7725.c @@ -221,6 +221,9 @@ static int set_pixformat(sensor_t *sensor, pixformat_t pixformat) static int set_framesize(sensor_t *sensor, framesize_t framesize) { int ret=0; + if (framesize > FRAMESIZE_VGA) { + return -1; + } uint16_t w = resolution[framesize].width; uint16_t h = resolution[framesize].height; uint8_t reg = SCCB_Read(sensor->slv_addr, COM7);