[wpkg-users] [Bug 196] New: wpkg.js (1.1.3-RC6) crash if network card service ID is not present under tcpip\parameters\interfaces

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Thu Dec 16 11:24:25 CET 2010


http://bugzilla.wpkg.org/show_bug.cgi?id=196

           Summary: wpkg.js (1.1.3-RC6) crash if network card service ID
                    is not present under tcpip\parameters\interfaces
           Product: WPKG
           Version: other
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: wpkg.js
        AssignedTo: mangoo at wpkg.org
        ReportedBy: daniel.dehennin at ac-caen.fr
         QAContact: wpkg-users at lists.wpkg.org


Created attachment 174
  --> http://bugzilla.wpkg.org/attachment.cgi?id=174
fix getIPAddresses to avoid crash

Sometimes, a network card has no tpcip parameters associated, some sort of
ghost network card, this result in the following

#v+
DEBUG   : Host operating system: microsoft windows xp professionnel sp3
[5.1.2600]
DEBUG   : Found network service: {C62CF9BF-FE6A-45C6-B6F7-10A0C46096A8}
DEBUG   : Reading DHCP address.
DEBUG   : Found DHCP address: 10.14.66.160
DEBUG   : Found network service: {DA397313-EE5F-4F7E-8211-10306B0F330C}
DEBUG   : Reading fixed IP address(es).
ERROR   : Message:      'null' a la valeur Null ou n'est pas un
objet.|Description:  'null' a la valeur Null ou n'est pas un objet.|Error
number: 800a138f|Stack:        undefined|Line:         undefined|
#v-

The problem is in getIPAddresses:

#v+
var fixedIPs = getRegistryValue(regBase + "IPAddress").toArray();
#v-

If getRegistryValue return null, we call null.toArray().

I provide a patch which split this in two parts, first store getRegistryValue
result and then, if not null call toArray() on it.

I add another test before probing for IP parameters: test if the network card
service ID is present under Tcpip\parameters\Intefaces.

Here is my changelog:

Fix IP address probe in case no TCP/IP parameters are defined for a network
card service.

* wpkg.js (getIPAddresses): Check if regBase exist before probing
  DHCP and fixed IP. It may happen that no Tcpip\Parameters\Interfaces
  exists for a network card service.
  Split the fixed IP to avoid calling null.toArray() in case
  getRegistryValue returns null

-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the wpkg-users mailing list