Re: [PATCH] USERSPACE: usr/strings.c: check NULL pointer first and add limit check in str_remove_initial

2011-08-19 Thread Wang Sheng-Hui
On 2011年08月19日 01:03, Mike Christie wrote: heck NULL pointer first before reference its member, and check the limit on the data buffer in function str_remove_initial. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- usr/strings.c | 13 + 1 files changed, 9 insertions(+), 4

Re: [PATCH] USERSPACE: usr/strings.c: check NULL pointer first and add limit check in str_remove_initial

2011-08-18 Thread Wang Sheng-Hui
On 2011年08月18日 04:38, Mike Christie wrote: Did you actually hit this or just find it by searching the code? I found it while I'm reading its source code. Do I need to regenerate the patch? On 08/15/2011 07:37 PM, Wang Sheng-Hui wrote: diff --git a/usr/strings.c b/usr/strings.c index

Re: [PATCH] USERSPACE: usr/strings.c: check NULL pointer first and add limit check in str_remove_initial

2011-08-18 Thread Wang Sheng-Hui
On 2011年08月18日 10:03, Wang Sheng-Hui wrote: On 2011年08月18日 04:38, Mike Christie wrote: Did you actually hit this or just find it by searching the code? I found it while I'm reading its source code. Do I need to regenerate the patch? On 08/15/2011 07:37 PM, Wang Sheng-Hui wrote: diff

Re: [PATCH] USERSPACE: usr/strings.c: check NULL pointer first and add limit check in str_remove_initial

2011-08-18 Thread Mike Christie
heck NULL pointer first before reference its member, and check the limit on the data buffer in function str_remove_initial. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- usr/strings.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/usr/strings.c

Re: [PATCH] USERSPACE: usr/strings.c: check NULL pointer first and add limit check in str_remove_initial

2011-08-17 Thread Mike Christie
Did you actually hit this or just find it by searching the code? On 08/15/2011 07:37 PM, Wang Sheng-Hui wrote: diff --git a/usr/strings.c b/usr/strings.c index ee6a51c..6432c2c 100644 --- a/usr/strings.c +++ b/usr/strings.c @@ -97,11 +97,16 @@ int str_enlarge_data(struct str_buffer *s, int

[PATCH] USERSPACE: usr/strings.c: check NULL pointer first and add limit check in str_remove_initial

2011-08-17 Thread Wang Sheng-Hui
We should check NULL pointer first before reference its member, and check the limit on the data buffer in function str_remove_initial. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- usr/strings.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git