1--TEST-- 2GH-17047 (UAF on iconv filter failure) 3--EXTENSIONS-- 4iconv 5--FILE-- 6<?php 7$stream = fopen('php://temp', 'w+'); 8stream_filter_append($stream, 'convert.iconv.UTF-16BE.UTF-8'); 9stream_filter_append($stream, 'convert.iconv.UTF-16BE.UTF-16BE'); 10fputs($stream, 'test'); 11rewind($stream); 12var_dump(stream_get_contents($stream)); 13fclose($stream); 14?> 15--EXPECTF-- 16Warning: stream_get_contents(): iconv stream filter ("UTF-16BE"=>"UTF-16BE"): invalid multibyte sequence in %s on line %d 17string(0) "" 18