|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: anthon dot pang at gmail dot com
New email:
PHP Version: OS:


 [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: Tue Sep 22 22:01:24 2020 UTC