Re: [PATCH] target: iscsi: iscsi_target_tpg.c: Cleaning up possible size overwriting in conjunction with sprintf

2014-10-12 Thread Rickard Strandqvist
2014-10-12 20:18 GMT+02:00 Joe Perches : > On Sun, 2014-10-12 at 19:55 +0200, Rickard Strandqvist wrote: >> Changed same snprintf and sprintf to strlcpy and strlcat. >> This will guarantee that the string size is not overwritten, >> and they are significantly faster than sprintf also. > > I don't

Re: [PATCH] target: iscsi: iscsi_target_tpg.c: Cleaning up possible size overwriting in conjunction with sprintf

2014-10-12 Thread Joe Perches
On Sun, 2014-10-12 at 19:55 +0200, Rickard Strandqvist wrote: > Changed same snprintf and sprintf to strlcpy and strlcat. > This will guarantee that the string size is not overwritten, > and they are significantly faster than sprintf also. I don't disagree with the change, but I think the

[PATCH] target: iscsi: iscsi_target_tpg.c: Cleaning up possible size overwriting in conjunction with sprintf

2014-10-12 Thread Rickard Strandqvist
Changed same snprintf and sprintf to strlcpy and strlcat. This will guarantee that the string size is not overwritten, and they are significantly faster than sprintf also. Signed-off-by: Rickard Strandqvist --- drivers/target/iscsi/iscsi_target_tpg.c | 16 +++- 1 file changed, 7

[PATCH] target: iscsi: iscsi_target_tpg.c: Cleaning up possible size overwriting in conjunction with sprintf

2014-10-12 Thread Rickard Strandqvist
Changed same snprintf and sprintf to strlcpy and strlcat. This will guarantee that the string size is not overwritten, and they are significantly faster than sprintf also. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- drivers/target/iscsi/iscsi_target_tpg.c | 16

Re: [PATCH] target: iscsi: iscsi_target_tpg.c: Cleaning up possible size overwriting in conjunction with sprintf

2014-10-12 Thread Joe Perches
On Sun, 2014-10-12 at 19:55 +0200, Rickard Strandqvist wrote: Changed same snprintf and sprintf to strlcpy and strlcat. This will guarantee that the string size is not overwritten, and they are significantly faster than sprintf also. I don't disagree with the change, but I think the changelog

Re: [PATCH] target: iscsi: iscsi_target_tpg.c: Cleaning up possible size overwriting in conjunction with sprintf

2014-10-12 Thread Rickard Strandqvist
2014-10-12 20:18 GMT+02:00 Joe Perches j...@perches.com: On Sun, 2014-10-12 at 19:55 +0200, Rickard Strandqvist wrote: Changed same snprintf and sprintf to strlcpy and strlcat. This will guarantee that the string size is not overwritten, and they are significantly faster than sprintf also. I