Download src/php/php-src/ext/libxml/tests/bug63389.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 578 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/libxml/tests/bug63389.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/libxml/tests/bug63389.phpt
-
curl -L -o bug63389.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/libxml/tests/bug63389.phpt
578 Bytes
| --TEST-- | |
| Bug #63389 (Missing context check on libxml_set_streams_context() causes memleak) | |
| --EXTENSIONS-- | |
| libxml | |
| --FILE-- | |
| try { | |
| libxml_set_streams_context("a"); | |
| } catch (TypeError $e) { | |
| echo $e->getMessage(), "\n"; | |
| } | |
| $fp = fopen("php://input", "r"); | |
| try { | |
| libxml_set_streams_context($fp); | |
| } catch (TypeError $e) { | |
| echo $e->getMessage(), "\n"; | |
| } | |
| echo "okey"; | |
| --EXPECT-- | |
| libxml_set_streams_context(): Argument #1 ($context) must be of type resource, string given | |
| libxml_set_streams_context(): supplied resource is not a valid Stream-Context resource | |
| okey | |