projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44fc1be
)
gl-renderer: Fix crash in dmabuf format query for fallback formats
author
Philipp Kerling
<pkerling@casix.org>
Fri, 9 Feb 2018 20:59:17 +0000
(21:59 +0100)
committer
Daniel Stone
<daniels@collabora.com>
Mon, 12 Feb 2018 09:11:40 +0000
(09:11 +0000)
Since formats is an out parameter, we need to copy to the alloc'ed
memory and not over the pointer address.
Signed-off-by: Philipp Kerling <pkerling@casix.org>
Reviewed-by: Daniel Stone <daniels@collabora.com>
libweston/gl-renderer.c
patch
|
blob
|
history
diff --git
a/libweston/gl-renderer.c
b/libweston/gl-renderer.c
index
371e06b
..
d091d16
100644
(file)
--- a/
libweston/gl-renderer.c
+++ b/
libweston/gl-renderer.c
@@
-2122,7
+2122,7
@@
gl_renderer_query_dmabuf_formats(struct weston_compositor *wc,
}
if (fallback) {
- memcpy(formats, fallback_formats, num * sizeof(int));
+ memcpy(
*
formats, fallback_formats, num * sizeof(int));
*num_formats = num;
return;
}