Re: [RFC, WIP, v4 06/11] media: vidtv: add wrappers for memcpy and memset

2020-05-03 Thread Mauro Carvalho Chehab
Em Sat, 2 May 2020 08:40:38 +0200 Mauro Carvalho Chehab escreveu: > Em Sat, 2 May 2020 00:22:11 -0300 > "Daniel W. S. Almeida" escreveu: > > > +u32 vidtv_memcpy(void *to, > > +const void *from, > > +size_t len, > > +u32 offset, > > +u32 buf_sz)

Re: [RFC, WIP, v4 06/11] media: vidtv: add wrappers for memcpy and memset

2020-05-02 Thread Mauro Carvalho Chehab
Em Sat, 2 May 2020 00:22:11 -0300 "Daniel W. S. Almeida" escreveu: > From: "Daniel W. S. Almeida" > > A lot of code in this driver is for serializing structures. This is > error prone. > > Therefore, prevent buffer overflows by wrapping memcpy and memset, > comparing the requested length

[RFC, WIP, v4 06/11] media: vidtv: add wrappers for memcpy and memset

2020-05-01 Thread Daniel W. S. Almeida
From: "Daniel W. S. Almeida" A lot of code in this driver is for serializing structures. This is error prone. Therefore, prevent buffer overflows by wrapping memcpy and memset, comparing the requested length against the buffer size. Signed-off-by: Daniel W. S. Almeida ---