mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
system/nxcamera: fix sscanf overflow
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
This commit is contained in:
parent
1207977447
commit
ce84d5d7cd
1 changed files with 2 additions and 2 deletions
|
|
@ -152,12 +152,12 @@ static int nxcamera_cmd_stream(FAR struct nxcamera_s *pcam, FAR char *parg)
|
|||
uint32_t framerate = 0;
|
||||
uint32_t format = 0;
|
||||
int ret;
|
||||
char cc[4] =
|
||||
char cc[5] =
|
||||
{
|
||||
0
|
||||
};
|
||||
|
||||
sscanf(parg, "%hd %hd %d %s", &width, &height, &framerate, cc);
|
||||
sscanf(parg, "%hd %hd %d %4s", &width, &height, &framerate, cc);
|
||||
format = v4l2_fourcc(cc[0], cc[1], cc[2], cc[3]);
|
||||
|
||||
/* Try to stream raw data with settings specified */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue