Re: [PATCH] drivers/staging/irda: fix max dup length for kstrndup

2017-12-12 Thread Ma Shimiao
On 12/13/2017 02:27 AM, Stephen Hemminger wrote: > On Tue, 12 Dec 2017 16:54:44 +0800 > Ma Shimiao <mashimiao.f...@cn.fujitsu.com> wrote: > >> If source string longer than max, kstrndup will alloc max+1 space. >> So, we should make sure the result will not over lim

[PATCH] drivers/staging/irda: fix max dup length for kstrndup

2017-12-12 Thread Ma Shimiao
If source string longer than max, kstrndup will alloc max+1 space. So, we should make sure the result will not over limit. Signed-off-by: Ma Shimiao <mashimiao.f...@cn.fujitsu.com> --- drivers/staging/irda/net/irias_object.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)