Skip Menu |

This queue is for tickets about the Win32-IPHelper CPAN distribution.

Report information
The Basics
Id: 118169
Status: new
Priority: 0/
Queue: Win32-IPHelper

People
Owner: Nobody in particular
Requestors: douglas.c.tanner [...] navy.mil
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: GetAdaptersInfo causing program to crash
Date: Fri, 30 Sep 2016 15:31:44 +0000
To: "bug-Win32-IPHelper [...] rt.cpan.org" <bug-Win32-IPHelper [...] rt.cpan.org>
From: "Tanner, Douglas C CIV SPAWARSYSCEN-ATLANTIC, 59320" <douglas.c.tanner [...] navy.mil>
I am running a program on 64-bit windows using 64-bit perl. My program is crashing when I call Win32::IPHelper::GetAdaptersInfo(\@IP_ADAPTER_INFO); It appears the buffer size or something is off b/c if I use 32-bit perl it runs fine. Specifically, it is crashing in _shiftunpack at line my @values = unpack($element, $buf); If I print out $buf prior to the crash it is holding "255.255". My assumption here is that it is trying to get the netmask but the position or buffer size was previously incorrect. Any help would be greatly appreciated. Doug
Subject: RE: [Non-DoD Source] [rt.cpan.org #118169] AutoReply: GetAdaptersInfo causing program to crash
Date: Wed, 12 Oct 2016 14:53:48 +0000
To: "bug-Win32-IPHelper [...] rt.cpan.org" <bug-Win32-IPHelper [...] rt.cpan.org>
From: "Tanner, Douglas C CIV SPAWARSYSCEN-ATLANTIC, 59320" <douglas.c.tanner [...] navy.mil>
After researching the issue more, I've tracked down the problem to the _IP_ADAPTER_INFO function. my $size = $PTR_SIZE + 636 + 8 + 4 + 4; #Added 8 to position to align correctly ($pos, @{ $hash{'IpAddressList'} }) = _IP_ADDR_STRING($buffer, $pos+8); #Added 4 to position to align correctly ($pos, @{ $hash{'GatewayList'} }) = _IP_ADDR_STRING($buffer, $pos+4); #Added 4 to position to align correctly ($pos, @{ $hash{'DhcpServer'} }) = _IP_ADDR_STRING($buffer, $pos+4); This correctly aligns the position variable so that the IpAddressList, GatewayList, and DhcpServer are returned correctly without crashing the program. Doug Show quoted text
________________________________ From: Bugs in Win32-IPHelper via RT [bug-Win32-IPHelper@rt.cpan.org] Sent: Friday, September 30, 2016 11:32 AM To: Tanner, Douglas C CIV SPAWARSYSCEN-ATLANTIC, 59320 Subject: [Non-DoD Source] [rt.cpan.org #118169] AutoReply: GetAdaptersInfo causing program to crash Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding: "GetAdaptersInfo causing program to crash", a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of [rt.cpan.org #118169]. Your ticket is accessible on the web at: https://rt.cpan.org/Ticket/Display.html?id=118169 Please include the string: [rt.cpan.org #118169] in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, bug-Win32-IPHelper@rt.cpan.org ------------------------------------------------------------------------- I am running a program on 64-bit windows using 64-bit perl. My program is crashing when I call Win32::IPHelper::GetAdaptersInfo(\@IP_ADAPTER_INFO); It appears the buffer size or something is off b/c if I use 32-bit perl it runs fine. Specifically, it is crashing in _shiftunpack at line my @values = unpack($element, $buf); If I print out $buf prior to the crash it is holding "255.255". My assumption here is that it is trying to get the netmask but the position or buffer size was previously incorrect. Any help would be greatly appreciated. Doug