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
 [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

slaven (last revision 2018-10-21 22:17 UTC by batinic107 at gmail dot com)

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC