VirtualBox

Changeset 34042 in vbox


Ignore:
Timestamp:
Nov 12, 2010 7:03:55 PM (14 years ago)
Author:
vboxsync
Message:

NAT: warning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/socket.c

    r34038 r34042  
    724724        int rc = 0;
    725725        static int signalled = 0;
    726         uint8_t *pu8Buffer = NULL;
     726        char *pchBuffer = NULL;
    727727        bool fWithTemporalBuffer = false;
    728728
     
    763763        m->m_data += sizeof(struct udpiphdr);
    764764
    765         pu8Buffer = mtod(m, uint8_t *);
     765        pchBuffer = mtod(m, char *);
    766766        fWithTemporalBuffer = false;
    767767        /*
     
    772772        if (n > (slirp_size(pData) - sizeof(struct udpiphdr)))
    773773        {
    774             pu8Buffer = RTMemAlloc((n) * sizeof(uint8_t));
    775             if (!pu8Buffer)
     774            pchBuffer = RTMemAlloc((n) * sizeof(char));
     775            if (!pchBuffer)
    776776            {
    777777                m_freem(pData, m);
     
    780780            fWithTemporalBuffer = true;
    781781        }
    782         ret = recvfrom(so->s, pu8Buffer, n, 0,
     782        ret = recvfrom(so->s, pchBuffer, n, 0,
    783783                       (struct sockaddr *)&addr, &addrlen);
    784784        if (fWithTemporalBuffer)
     
    786786            if (ret > 0)
    787787            {
    788                 m_copyback(pData, m, 0, ret, pu8Buffer);
     788                m_copyback(pData, m, 0, ret, pchBuffer);
    789789                /*
    790790                 * If we've met comporison below our size prediction was failed
     
    797797            }
    798798            /* we're freeing buffer anyway */
    799             RTMemFree(pu8Buffer);
     799            RTMemFree(pchBuffer);
    800800        }
    801801        else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette