summaryrefslogtreecommitdiff
path: root/nexell/nexell_drm.c
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2020-07-27 10:59:47 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2020-07-27 10:59:51 +0900
commite4c88b0604df21dfb7d8ea37f2646c94d8d33bc8 (patch)
tree462ffc06ee40cd51269b6dac4f741d00aa3c511c /nexell/nexell_drm.c
parent0d14e229152037e457344829d061a669254e988b (diff)
downloadlibdrm-old/tizen_20201207.tar.gz
libdrm-old/tizen_20201207.tar.bz2
libdrm-old/tizen_20201207.zip
The commit 4f6c18f11c68 ("nexell: add explicit cast for gem size") introduced signed 32bit value into unsigned 64bit value and it can cause wrong value conversion. Fix to cast signed 32bit value into unsigned 32bit value first and then cast into unsigned 64bit value. Change-Id: I9550b74987ddd981e905f3b5085d4abaede01c65 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Diffstat (limited to 'nexell/nexell_drm.c')
-rw-r--r--nexell/nexell_drm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nexell/nexell_drm.c b/nexell/nexell_drm.c
index 867c8804..56f0f8ff 100644
--- a/nexell/nexell_drm.c
+++ b/nexell/nexell_drm.c
@@ -42,7 +42,7 @@ int nx_alloc_gem(int drm_fd, int size, int flags)
struct nx_drm_gem_create arg = { 0, };
int ret;
- arg.size = (uint64_t)size;
+ arg.size = (uint64_t)(unsigned int)size;
arg.flags = flags;
ret = drmCommandWriteRead(drm_fd, DRM_NX_GEM_CREATE, &arg,