Merge "msm: vidc: Validate userspace buffer count"

This commit is contained in:
Linux Build Service Account
2014-05-12 03:34:50 -07:00
committed by Gerrit - the friendly Code Review server
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -1110,6 +1110,12 @@ static u32 vid_dec_set_h264_mv_buffers(struct video_client_ctx *client_ctx,
vcd_h264_mv_buffer->pmem_fd = mv_data->pmem_fd;
vcd_h264_mv_buffer->offset = mv_data->offset;
if (mv_data->count > MAX_MV_BUFFERS) {
ERR("MV buffers maximum count reached, count = %d",
mv_data->count);
return false;
}
if (!vcd_get_ion_status()) {
pr_err("PMEM not available\n");
return false;
+1
View File
@@ -20,6 +20,7 @@
#define VIDC_MAX_NUM_CLIENTS 4
#define MAX_VIDEO_NUM_OF_BUFF 100
#define MAX_META_BUFFERS 32
#define MAX_MV_BUFFERS 32
enum buffer_dir {
BUFFER_TYPE_INPUT,