Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spi: spi-zynq-qspi: Fixed buffer overflow in zynq_qspi_exec_mem_op
Const-incorrectness, inconsistent memory allocation policy and buffer overflow in the zynq_qspi_exec_mem_op function of spi-zynq-qspi.c causes op constant input structure fields to be overwritten. Variable xqspi->txbuf is not allocated for address processing and re-uses the buffer pointer from command processing. As per the TRM Zynq QSPI only supports 3byte addressing mode. Driver reports an invalid argument error if the address width is greater than 3bytes. Signed-off-by: Ferenc Damo <ferenc.damo@ni.com> Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
- Loading branch information