projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
baa91d6
)
drm: Ensure string is null terminated.
author
Vinson Lee
<vlee@vmware.com>
Thu, 10 Nov 2011 19:55:40 +0000
(11:55 -0800)
committer
Dave Airlie
<airlied@redhat.com>
Fri, 11 Nov 2011 10:59:15 +0000
(10:59 +0000)
Fixes Coverity buffer not null terminated defect.
Signed-off-by: Vinson Lee <vlee@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/drm_crtc.c
b/drivers/gpu/drm/drm_crtc.c
index 9a2e2a14b3bb2e2c1631ae40341d886e1148bef9..405c63b9d539a74826b0ecfdb6d4000f5a43b2f5 100644
(file)
--- a/
drivers/gpu/drm/drm_crtc.c
+++ b/
drivers/gpu/drm/drm_crtc.c
@@
-2118,8
+2118,10
@@
struct drm_property *drm_property_create(struct drm_device *dev, int flags,
property->num_values = num_values;
INIT_LIST_HEAD(&property->enum_blob_list);
- if (name)
+ if (name)
{
strncpy(property->name, name, DRM_PROP_NAME_LEN);
+ property->name[DRM_PROP_NAME_LEN-1] = '\0';
+ }
list_add_tail(&property->head, &dev->mode_config.property_list);
return property;