Re: [PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

2017-08-03 Thread Minchan Kim
On Thu, Aug 03, 2017 at 09:33:50AM -0700, Matthias Kaehlcke wrote: > comp_algorithm_store() passes the size of the source buffer to strlcpy() > instead of the destination buffer size. Make it explicit that the two > buffers have the same size and use strcpy() instead of strlcpy(). > The latter can

Re: [PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

2017-08-03 Thread Minchan Kim
On Thu, Aug 03, 2017 at 09:33:50AM -0700, Matthias Kaehlcke wrote: > comp_algorithm_store() passes the size of the source buffer to strlcpy() > instead of the destination buffer size. Make it explicit that the two > buffers have the same size and use strcpy() instead of strlcpy(). > The latter can

Re: [PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

2017-08-03 Thread Sergey Senozhatsky
On (08/03/17 09:33), Matthias Kaehlcke wrote: > comp_algorithm_store() passes the size of the source buffer to strlcpy() > instead of the destination buffer size. Make it explicit that the two > buffers have the same size and use strcpy() instead of strlcpy(). > The latter can be done safely since

Re: [PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

2017-08-03 Thread Sergey Senozhatsky
On (08/03/17 09:33), Matthias Kaehlcke wrote: > comp_algorithm_store() passes the size of the source buffer to strlcpy() > instead of the destination buffer size. Make it explicit that the two > buffers have the same size and use strcpy() instead of strlcpy(). > The latter can be done safely since

Re: [PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

2017-08-03 Thread Doug Anderson
Hi, On Thu, Aug 3, 2017 at 9:33 AM, Matthias Kaehlcke wrote: > comp_algorithm_store() passes the size of the source buffer to strlcpy() > instead of the destination buffer size. Make it explicit that the two > buffers have the same size and use strcpy() instead of strlcpy(). >

Re: [PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

2017-08-03 Thread Doug Anderson
Hi, On Thu, Aug 3, 2017 at 9:33 AM, Matthias Kaehlcke wrote: > comp_algorithm_store() passes the size of the source buffer to strlcpy() > instead of the destination buffer size. Make it explicit that the two > buffers have the same size and use strcpy() instead of strlcpy(). > The latter can be

[PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

2017-08-03 Thread Matthias Kaehlcke
comp_algorithm_store() passes the size of the source buffer to strlcpy() instead of the destination buffer size. Make it explicit that the two buffers have the same size and use strcpy() instead of strlcpy(). The latter can be done safely since the function ensures that the string in the source

[PATCH v2] zram: Rework copy of compressor name in comp_algorithm_store()

2017-08-03 Thread Matthias Kaehlcke
comp_algorithm_store() passes the size of the source buffer to strlcpy() instead of the destination buffer size. Make it explicit that the two buffers have the same size and use strcpy() instead of strlcpy(). The latter can be done safely since the function ensures that the string in the source