VirtualBox

Changeset 5378 in vbox for trunk/src


Ignore:
Timestamp:
Oct 19, 2007 9:09:51 AM (17 years ago)
Author:
vboxsync
Message:

Fix incorrect MAC address validity check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/NetworkAdapterImpl.cpp

    r5120 r5378  
    342342                    ((c < 'A') || (c > 'F')))
    343343                    rc = setError(E_INVALIDARG, tr("Invalid MAC address format"));
    344                 /* the second digit must be even for unicast addresses */
    345                 if ((i == 1) && (c & 1))
     344                /* the second digit must have even value for unicast addresses */
     345                if ((i == 1) && (!!(c & 1) == (c >= '0' && c <= '9')))
    346346                    rc = setError(E_INVALIDARG, tr("Invalid MAC address format"));
    347347
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