https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6734d4ca091eab148babd…
commit 6734d4ca091eab148babd0c9832d4b0a42c2caee
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Wed Jun 12 17:48:35 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Wed Jun 12 17:48:35 2019 +0200
[IPCONFIG] Fix crash on 'ipconfig /all'
Ipconfig should not display invalid 'Lease Obtained' and 'Lease
Expires' times because it did not yet receive any DHCP configuration.
Fixes CORE-11837
---
base/applications/network/ipconfig/ipconfig.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/applications/network/ipconfig/ipconfig.c
b/base/applications/network/ipconfig/ipconfig.c
index 51651bca524..8198e6702db 100644
--- a/base/applications/network/ipconfig/ipconfig.c
+++ b/base/applications/network/ipconfig/ipconfig.c
@@ -543,7 +543,7 @@ VOID ShowInfo(BOOL bAll)
_tprintf(_T("\tSecondary WINS Server . . . . . . : %s\n"),
pAdapter->SecondaryWinsServer.IpAddress.String);
}
- if (pAdapter->DhcpEnabled)
+ if (pAdapter->DhcpEnabled &&
_tcscmp(pAdapter->DhcpServer.IpAddress.String, _T("255.255.255.255")))
{
_tprintf(_T("\tLease Obtained. . . . . . . . . . : %s"),
_tasctime(localtime(&pAdapter->LeaseObtained)));
_tprintf(_T("\tLease Expires . . . . . . . . . . : %s"),
_tasctime(localtime(&pAdapter->LeaseExpires)));