Fixed a case of off by one in network/net_ne2000.c.

This commit is contained in:
Miran Grča 2024-11-01 20:26:24 +01:00 committed by GitHub
parent c17fbfb9c6
commit b44c214cea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1076,9 +1076,9 @@ nic_init(const device_t *info)
mac_oui |= ((int) dev->maclocal[2]);
device_set_config_mac("mac", mac);
} else {
dev->maclocal[1] = (mac_oui >> 16) & 0xff;
dev->maclocal[2] = (mac_oui >> 8) & 0xff;
dev->maclocal[3] = (mac_oui & 0xff);
dev->maclocal[0] = (mac_oui >> 16) & 0xff;
dev->maclocal[1] = (mac_oui >> 8) & 0xff;
dev->maclocal[2] = (mac_oui & 0xff);
}
}