mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 15:48:05 +02:00
fbdev: Ensure strncpy results are null terminated.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
parent
c8dcd16b01
commit
44bbdd08af
1 changed files with 1 additions and 0 deletions
|
|
@ -338,6 +338,7 @@ fbdev_query_screen_info(struct fbdev_output *output, int fd,
|
|||
info->buffer_length = fixinfo.smem_len;
|
||||
info->line_length = fixinfo.line_length;
|
||||
strncpy(info->id, fixinfo.id, sizeof(info->id));
|
||||
info->id[sizeof(info->id)-1] = '\0';
|
||||
|
||||
info->pixel_format = calculate_pixman_format(&varinfo, &fixinfo);
|
||||
info->refresh_rate = calculate_refresh_rate(&varinfo);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue