HaxeFoundation / HaxeFoundation/haxe

infinite loop in EReg.map()

Open
#11,748 0 comments 0 reactions 0 assignees View on GitHub
platform-php
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

This seems to cause an infinite loop on PHP.
The "a0" character probably came from a mysql import.

```Haxe
class Eregtest {
public static function main():Void {
final hex = "7b7b706f7274616c2e6e616d657d7d2220636c6173733d22746578742d6461726b223e3c7370616e20636c6173733d226661732066612d70686f6e65223e3c2f7370616e3ea0207b7b70686f6e652e6e756d6265727d7d3c2f613e3c2f703e0d0a3c2f616464726573733e";
final text = php.Global.hex2bin(hex);
trace(text);
trace(~/\{\{(.*?)\}\}/g.map(text, (r) -> "huh"));
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.