Re: [Openvpn-devel] [PATCH] cppcheck finding: add "ASSERT( maxoutput > 0 || separator != NULL )" to prevent possible null pointer derefence

2016-09-18 Thread Jens Neuhalfen
> > Hello, > > this defect was found by cppcheck, however cppcheck still complains. > so, we did not make it happy yet. > > I think, the best would be split this function into 2 separate functions > (with either null argument) or leave it like that. Unrelated to an actual fix, IMHO we should

Re: [Openvpn-devel] [PATCH] cppcheck finding: add "ASSERT( maxoutput > 0 || separator != NULL )" to prevent possible null pointer derefence

2016-09-18 Thread Илья Шипицин
Hello, this defect was found by cppcheck, however cppcheck still complains. so, we did not make it happy yet. I think, the best would be split this function into 2 separate functions (with either null argument) or leave it like that. 2016-09-18 20:14 GMT+05:00 David Sommerseth <

Re: [Openvpn-devel] [PATCH] cppcheck finding: add "ASSERT( maxoutput > 0 || separator != NULL )" to prevent possible null pointer derefence

2016-09-18 Thread Gert Doering
Hi, On Sun, Sep 18, 2016 at 06:14:09PM +0300, David Sommerseth wrote: > This looks dangerous and somewhat wrong. This can actually stop a > server completely if the ASSERT() check fails. I'm not sure we want > to do that. This was discussed in a github PR, but I do not have the number right

Re: [Openvpn-devel] [PATCH] cppcheck finding: add "ASSERT( maxoutput > 0 || separator != NULL )" to prevent possible null pointer derefence

2016-09-18 Thread David Sommerseth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18/09/16 17:19, Ilya Shipitsin wrote: > --- src/openvpn/buffer.c | 6 -- 1 file changed, 4 > insertions(+), 2 deletions(-) > > diff --git a/src/openvpn/buffer.c b/src/openvpn/buffer.c index > 52c6ab9..57bded9 100644 --- a/src/openvpn/buffer.c

[Openvpn-devel] [PATCH] cppcheck finding: add "ASSERT( maxoutput > 0 || separator != NULL )" to prevent possible null pointer derefence

2016-09-18 Thread Ilya Shipitsin
--- src/openvpn/buffer.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openvpn/buffer.c b/src/openvpn/buffer.c index 52c6ab9..57bded9 100644 --- a/src/openvpn/buffer.c +++ b/src/openvpn/buffer.c @@ -438,10 +438,12 @@ format_hex_ex (const uint8_t *data, int size,