diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2020-07-27 10:59:47 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2020-07-27 10:59:51 +0900 |
commit | e4c88b0604df21dfb7d8ea37f2646c94d8d33bc8 (patch) | |
tree | 462ffc06ee40cd51269b6dac4f741d00aa3c511c | |
parent | 0d14e229152037e457344829d061a669254e988b (diff) | |
download | libdrm-old/tizen_20201207.tar.gz libdrm-old/tizen_20201207.tar.bz2 libdrm-old/tizen_20201207.zip |
nexell: fix signed/unsinged casttizen_6.0.m2_releasesubmit/tizen_6.0_hotfix/20201103.115102submit/tizen_6.0_hotfix/20201102.192902submit/tizen_6.0/20201029.205502submit/tizen/20200728.104515submit/tizen/20200728.021629accepted/tizen/unified/20200730.130915accepted/tizen/unified/20200729.165659accepted/tizen/6.0/unified/hotfix/20201103.051322accepted/tizen/6.0/unified/hotfix/20201102.234505accepted/tizen/6.0/unified/20201030.110602tizen_6.0_hotfixtizen_6.0old/tizen_20201207accepted/tizen_6.0_unified_hotfixaccepted/tizen_6.0_unified
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>
-rw-r--r-- | nexell/nexell_drm.c | 2 |
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, |