Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-18 Thread Matthias Andree
Am 18.05.23 um 09:09 schrieb Gert Doering: Hi, On Thu, May 18, 2023 at 09:00:26AM +0200, Matthias Andree wrote: That, and constants usually go on the left-hand side of comparison so the compiler flags the accidental if (foo = NULL) even if it does not produce "add a pair of parentheses if you

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-18 Thread Илья Шипицин
чт, 18 мая 2023 г. в 09:10, Илья Шипицин : > > > чт, 18 мая 2023 г. в 08:47, Gert Doering : > >> Hi, >> >> On Wed, May 17, 2023 at 04:43:01PM -0400, Kristof Provost wrote: >> > Fwiw: I usually don???t bother handling malloc failure in userspace, >> > because modern systems all overallocate

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-18 Thread Илья Шипицин
чт, 18 мая 2023 г. в 08:47, Gert Doering : > Hi, > > On Wed, May 17, 2023 at 04:43:01PM -0400, Kristof Provost wrote: > > Fwiw: I usually don???t bother handling malloc failure in userspace, > > because modern systems all overallocate anyway, so the first thing > > you know about lack of memory

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-18 Thread Gert Doering
Hi, On Thu, May 18, 2023 at 09:00:26AM +0200, Matthias Andree wrote: > That, and constants usually go on the left-hand side of comparison so > the compiler flags the accidental if (foo = NULL) even if it does not > produce "add a pair of parentheses if you really mean to use an > assignment as

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-18 Thread Matthias Andree
Am 17.05.23 um 22:47 schrieb Antonio Quartulli: Hi, On 17/05/2023 22:01, Ilya Shipitsin wrote: malloc was not checked against NULL, I was able to get core dump in case of failure Signed-off-by: Ilya Shipitsin ---   src/openvpn/dco_freebsd.c | 5 +   1 file changed, 5 insertions(+) diff

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-18 Thread Gert Doering
Hi, On Wed, May 17, 2023 at 04:43:01PM -0400, Kristof Provost wrote: > Fwiw: I usually don???t bother handling malloc failure in userspace, > because modern systems all overallocate anyway, so the first thing > you know about lack of memory is the out-of-memory killer terminating > you. It???s a

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-17 Thread Antonio Quartulli
Hi, On 17/05/2023 23:10, Kristof Provost wrote: On 17 May 2023, at 17:06, Илья Шипицин wrote: ср, 17 мая 2023 г. в 23:04, Kristof Provost : On 17 May 2023, at 16:58, Илья Шипицин wrote: ср, 17 мая 2023 г. в 22:43, Kristof Provost : On 17 May 2023, at 16:01, Ilya Shipitsin wrote: malloc

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-17 Thread Kristof Provost
On 17 May 2023, at 17:06, Илья Шипицин wrote: > ср, 17 мая 2023 г. в 23:04, Kristof Provost : > >> On 17 May 2023, at 16:58, Илья Шипицин wrote: >>> ср, 17 мая 2023 г. в 22:43, Kristof Provost : >>> On 17 May 2023, at 16:01, Ilya Shipitsin wrote: > malloc was not checked against NULL, I

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-17 Thread Илья Шипицин
ср, 17 мая 2023 г. в 23:04, Kristof Provost : > On 17 May 2023, at 16:58, Илья Шипицин wrote: > > ср, 17 мая 2023 г. в 22:43, Kristof Provost : > > > >> On 17 May 2023, at 16:01, Ilya Shipitsin wrote: > >>> malloc was not checked against NULL, I was able > >>> to get core dump in case of failure

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-17 Thread Kristof Provost
On 17 May 2023, at 16:58, Илья Шипицин wrote: > ср, 17 мая 2023 г. в 22:43, Kristof Provost : > >> On 17 May 2023, at 16:01, Ilya Shipitsin wrote: >>> malloc was not checked against NULL, I was able >>> to get core dump in case of failure >>> >>> Signed-off-by: Ilya Shipitsin >>> --- >>>

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-17 Thread Илья Шипицин
ср, 17 мая 2023 г. в 22:47, Antonio Quartulli : > Hi, > > On 17/05/2023 22:01, Ilya Shipitsin wrote: > > malloc was not checked against NULL, I was able > > to get core dump in case of failure > > > > Signed-off-by: Ilya Shipitsin > > --- > > src/openvpn/dco_freebsd.c | 5 + > > 1 file

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-17 Thread Илья Шипицин
ср, 17 мая 2023 г. в 22:43, Kristof Provost : > On 17 May 2023, at 16:01, Ilya Shipitsin wrote: > > malloc was not checked against NULL, I was able > > to get core dump in case of failure > > > > Signed-off-by: Ilya Shipitsin > > --- > > src/openvpn/dco_freebsd.c | 5 + > > 1 file changed,

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-17 Thread Antonio Quartulli
Hi, On 17/05/2023 22:01, Ilya Shipitsin wrote: malloc was not checked against NULL, I was able to get core dump in case of failure Signed-off-by: Ilya Shipitsin --- src/openvpn/dco_freebsd.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/openvpn/dco_freebsd.c

Re: [Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-17 Thread Kristof Provost
On 17 May 2023, at 16:01, Ilya Shipitsin wrote: > malloc was not checked against NULL, I was able > to get core dump in case of failure > > Signed-off-by: Ilya Shipitsin > --- > src/openvpn/dco_freebsd.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/openvpn/dco_freebsd.c

[Openvpn-devel] [PATCH] src/openvpn/dco_freebsd.c: handle malloc failure

2023-05-17 Thread Ilya Shipitsin
malloc was not checked against NULL, I was able to get core dump in case of failure Signed-off-by: Ilya Shipitsin --- src/openvpn/dco_freebsd.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_freebsd.c index abeb..adbd1120 100644 ---