diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-05-19 23:31:39 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-05-19 23:31:39 +0200 |
commit | 3a78a901bbc07d9283a9b80e22be4e9500697745 (patch) | |
tree | cf48ae5482b99841091e8892512678a58374d45b | |
parent | 5154f4d6f89e9853b768fc0ec470fa4dff5f890a (diff) |
Zero structures before filling them
The parse_format function fills a v4l2_mbus_framefmt structure but
doesn't zero it beforehand. This results in some fields being
uninitialized. Fix this.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | main.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -223,6 +223,7 @@ static int parse_format(struct v4l2_mbus_framefmt *format, const char *p, char * height = strtoul(p, &end, 10); *endp = end; + memset(format, 0, sizeof(*format)); format->width = width; format->height = height; format->code = mbus_formats[i].code; |