|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-06-12 09:41 UTC] kristina at 10gen dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 02:00:01 2025 UTC |
Description: ------------ Driver version: git commit id 9668027 PHP version: 5.2.6-3ubuntu4.1 (comes with Ubuntu Jaunty). Problem: running the script below produces the following error: ALERT - canary mismatch on erealloc() - heap overflow detected (attacker 'REMOTE_ADDR not set', file '/home/matt/wg/wg.static/scripts/test2.php', line 14) The script grabs a file from my site, but feel free to look at it in your browser if you don't trust it. I have been migrating a bunch of data from MySQL to Mongo, and there was something in particular about this record. I have done a mb_detect_encoding() on it and it says "ASCII" - a hexdump also confirms this. I have migrated over 3 million records and this is the only one that has a problem. I haven't managed to compile my own version of PHP so I can't use --enable-debug - If you can't reproduce this, let me know and I'll give it another shot. Cheers! Reproduce code: --------------- <?php $connection = new Mongo(); $db = $connection->selectDB('webgenius'); $tbColl = $db->selectCollection('Text_Block'); $text = file_get_contents('http://webgenius.co.nz/mongo-bug.txt'); $arr = array( 'text' => $text, ); $tbColl->insert($arr); ?> Expected result: ---------------- The array should be inserted into the mongo database. Actual result: -------------- canary mismatch on erealloc() - heap overflow detected (attacker 'REMOTE_ADDR not set', file '/home/matt/wg/wg.static/scripts/test2.php', line 14)