Thread (9 messages) flat view 9 messages, 4 authors, 2019-06-01

Re: [PATCH] hooks: fix a missing-check bug in selinux_add_mnt_opt()

From: Gen Zhang <hidden>
Date: 2019-05-30 09:19:11
Also in: lkml, selinux

On Thu, May 30, 2019 at 12:11:33PM +0300, Sergei Shtylyov wrote:
Hello!

On 30.05.2019 11:06, Gen Zhang wrote:
quoted
In selinux_add_mnt_opt(), 'val' is allcoted by kmemdup_nul(). It returns
   Allocated?
Thanks for your reply, Sergei. I used 'allocated' because kmemdup_nul()
does some allocation in its implementation. And its docs descrips: 
"Return: newly allocated copy of @s with NUL-termination or %NULL in 
case of error". I think it is proper to use 'allocated' here. But it 
could be 'assigned', which is better, right?

Thanks
Gen
quoted
NULL when fails. So 'val' should be checked.

Signed-off-by: Gen Zhang <redacted>
[...]

MBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help