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:
 [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-2017 The PHP Group
All rights reserved.
Last updated: Tue Aug 29 15:01:52 2017 UTC