Loading sound/soc/msm/qdsp6v2/q6lsm.c +10 −1 Original line number Diff line number Diff line /* * Copyright (c) 2013-2014, Linux Foundation. All rights reserved. * Copyright (c) 2013-2015, Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1055,6 +1055,15 @@ int q6lsm_snd_model_buf_alloc(struct lsm_client *client, size_t len) client->sound_model.size = len; pad_zero = (LSM_ALIGN_BOUNDARY - (len % LSM_ALIGN_BOUNDARY)); if ((len > SIZE_MAX - pad_zero) || (len + pad_zero > SIZE_MAX - cal_block->cal_data.size)) { pr_err("%s: invalid allocation size, len = %zd, pad_zero =%zd, cal_size = %zd\n", __func__, len, pad_zero, cal_block->cal_data.size); rc = -EINVAL; goto fail; } total_mem = PAGE_ALIGN(pad_zero + len + cal_block->cal_data.size); Loading Loading
sound/soc/msm/qdsp6v2/q6lsm.c +10 −1 Original line number Diff line number Diff line /* * Copyright (c) 2013-2014, Linux Foundation. All rights reserved. * Copyright (c) 2013-2015, Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1055,6 +1055,15 @@ int q6lsm_snd_model_buf_alloc(struct lsm_client *client, size_t len) client->sound_model.size = len; pad_zero = (LSM_ALIGN_BOUNDARY - (len % LSM_ALIGN_BOUNDARY)); if ((len > SIZE_MAX - pad_zero) || (len + pad_zero > SIZE_MAX - cal_block->cal_data.size)) { pr_err("%s: invalid allocation size, len = %zd, pad_zero =%zd, cal_size = %zd\n", __func__, len, pad_zero, cal_block->cal_data.size); rc = -EINVAL; goto fail; } total_mem = PAGE_ALIGN(pad_zero + len + cal_block->cal_data.size); Loading