php.net |  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: -
Votes:2
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
Description:
------------
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)



Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Mar 22 16:01:26 2019 UTC