php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75075 unpack with X* causes infinity loop
Submitted: 2017-08-14 16:19 UTC Modified: -
From: erik at datahack dot se Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 7.1.8 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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: erik at datahack dot se
New email:
PHP Version: OS:

 

 [2017-08-14 16:19 UTC] erik at datahack dot se
Description:
------------
Using unpack with "X*" causes an infinity loop

Test script:
---------------
<?php

unpack("X*", "");

Expected result:
----------------
I would expect either 

A. * to not be a valid repeater for X
B. cause it to rewind to zero.

Actual result:
--------------
100% CPU usage

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-08-15 04:36 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d8c80af71e9b43e9adec9e3f57f2732a0ac95d71
Log: Fixed bug #75075 (unpack with X* causes infinity loop)
 [2017-08-15 04:36 UTC] laruence@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Wed Oct 17 22:01:26 2018 UTC