Re: [PATCH 2/2] rtc: s5m: Remove VLA usage

2018-03-12 Thread Krzysztof Kozlowski
On Sat, Mar 10, 2018 at 7:27 AM, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLAs and replace them > with fixed-length arrays instead. > > From a security viewpoint, the use of Variable Length Arrays can be > a vector for stack overflow attacks.

Re: [PATCH 2/2] rtc: s5m: Remove VLA usage

2018-03-12 Thread Krzysztof Kozlowski
On Sat, Mar 10, 2018 at 7:27 AM, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLAs and replace them > with fixed-length arrays instead. > > From a security viewpoint, the use of Variable Length Arrays can be > a vector for stack overflow attacks. Also, in general, as the

[PATCH 2/2] rtc: s5m: Remove VLA usage

2018-03-09 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus,

[PATCH 2/2] rtc: s5m: Remove VLA usage

2018-03-09 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLAs and replace them with fixed-length arrays instead. >From a security viewpoint, the use of Variable Length Arrays can be a vector for stack overflow attacks. Also, in general, as the code evolves it is easy to lose track of how big a VLA can get. Thus,