|  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.
Block user comment
Status: Assign to:
Bug Type:
From: erik at datahack dot se
New email:
PHP Version: OS:


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

Test script:

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


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

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-08-15 04:36 UTC]
Automatic comment on behalf of
Log: Fixed bug #75075 (unpack with X* causes infinity loop)
 [2017-08-15 04:36 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 12 15:01:35 2024 UTC