From 4e92f2651e0a3b927836d02025b1222dc750232e Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 3 May 2020 07:55:32 +0000 Subject: [PATCH] * Zero out at premature exit git-svn-id: trunk@45230 - --- packages/rtl-extra/src/inc/sockets.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/rtl-extra/src/inc/sockets.inc b/packages/rtl-extra/src/inc/sockets.inc index 442c71cf77..e62b6e4381 100644 --- a/packages/rtl-extra/src/inc/sockets.inc +++ b/packages/rtl-extra/src/inc/sockets.inc @@ -452,6 +452,7 @@ Var Part : String; ZeroAt : Integer; Begin FillChar(IPv6,SizeOf(IPv6),0); + FillChar(StrToHostAddr6,SizeOf(TIn6_addr),0); { Every 16-bit block is converted at its own and stored into Result. When } { the '::' zero-spacer is found, its location is stored. Afterwards the } { address is shifted and zero-filled. } @@ -469,7 +470,7 @@ Begin if J <> 0 then Begin FillChar(IPv6,SizeOf(IPv6),0); - Exit; + Exit(IPV6); End; if IP[1] = ':' then Begin