|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66982 uuid_mac checks wrong bit/byte for valid MAC address
Submitted: 2014-03-30 03:33 UTC Modified: -
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: anthon dot pang at gmail dot com Assigned:
Status: Open Package: uuid (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-03-30 03:33 UTC] anthon dot pang at gmail dot com
Currently, uuid.c uses: if(uuid[10] & 0x80)

First, 'uuid' is the 36 character string representation.  This should be 'u'.

Second, the multicast bit is actually the least significant bit.  This should be 0x01.

Propose change to:  if (u[10] & 0x01)


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Sep 26 09:01:24 2020 UTC