fpga: fpga-mgr: Fix undefined behavior
Moritz Fischer
maintainerPATCH 1/1 fpga: fpga-mgr: Fix undefined behavior
Incrementing void pointers is undefined behavior.
Fixes baa6d3966351 ("fpga: Add scatterlist based programming")
Signed-off-by Moritz Fischer <[email protected]>
--- drivers/fpga/fpga-mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/fpga-mgr.c +1 -1
@@ -299,7 +299,7 @@ static int fpga_mgr_buf_load(struct fpga_manager *mgr, {struct page **pages;struct sg_table sgt; -const void *p; +const char *p;int nr_pages;int index;int rc;
Signature · 1 line
2.36.0
Quoted 1 line · Moritz Fischer
Incrementing void pointers is undefined behavior.
AFIACR in the kernel dialect of C this is defined behavior..
Jason