diff options
| author | Clarence Ip <cip@codeaurora.org> | 2016-07-18 19:06:10 -0400 |
|---|---|---|
| committer | Dhaval Patel <pdhaval@codeaurora.org> | 2016-08-01 11:58:15 -0700 |
| commit | 86c14fe760abdcba3443857a663963db522e0285 (patch) | |
| tree | 8a060a4886fcd2918d6b6b1c1e7a26c95f574a19 /drivers/gpu | |
| parent | bd063d1910992e69b5c442fdf664737b1e6eea46 (diff) | |
drm/msm: handle null blob property array
Add error checking to msm_property_get_blob to avoid
null dereference if the blob property array is NULL.
Change-Id: I0e2e501eb1ed6beecae78a10e89fd755cc208ac6
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/msm/msm_prop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_prop.c b/drivers/gpu/drm/msm/msm_prop.c index 23e2555afb37..a67b1d548b5d 100644 --- a/drivers/gpu/drm/msm/msm_prop.c +++ b/drivers/gpu/drm/msm/msm_prop.c @@ -462,7 +462,7 @@ void *msm_property_get_blob(struct msm_property_info *info, size_t len = 0; void *rc = 0; - if (!info || (property_idx >= info->blob_count)) { + if (!info || !property_blobs || (property_idx >= info->blob_count)) { DRM_ERROR("invalid argument(s)\n"); } else { blob = property_blobs[property_idx]; |
