Re: [PATCH] wcd9335: fix a incorrect use of kstrndup()

2019-06-18 Thread Tyler Hicks
On 2019-06-05 06:57:02, Jiri Slaby wrote: > On 29. 05. 19, 3:53, Gen Zhang wrote: > > In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup(). > > However, according to doc: "Note: Use kmemdup_nul() instead if the size > > is known exactly." > > Except the size is not known exactly

Re: [PATCH] wcd9335: fix a incorrect use of kstrndup()

2019-06-04 Thread Jiri Slaby
On 29. 05. 19, 3:53, Gen Zhang wrote: > In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup(). > However, according to doc: "Note: Use kmemdup_nul() instead if the size > is known exactly." Except the size is not known exactly. It is at most 15, not 15. Right? > So we should use