Menu

#372 Possible ininite loop in vos_getInterfaces in vos_sock.c

2.1.0.0
closed
2273 (1)
2021-08-11
2021-08-02
No

If there are more than 8 interfaces on the computer, the loop condition may still be fulfilled, while the if clause in the loop is never called:

            pAddress = pAdapter->FirstUnicastAddress;
            while (pAddress != NULL)
            {
                /* store interface information if address will fit into output array */
                if (addrCnt < *pAddrCnt)
                {
                    ...
                    /* increment number of addresses stored */
                    addrCnt++;
                    pAddress = pAddress->Next;
                }
              }

addrCnt can then be 8, but pAdress would still not be NULL

Discussion

  • Armin-Hagen Weiss

    • labels: --> 2273
    • status: open --> pending
    • assigned_to: Stefan Bender
     
  • Armin-Hagen Weiss

    fix implemented

     
  • Stefan Bender

    Stefan Bender - 2021-08-11
    • status: pending --> closed
     
  • Stefan Bender

    Stefan Bender - 2021-08-11

    Tested on Devices with more than 8 Interfaces

     

Log in to post a comment.

MongoDB Logo MongoDB