Indefero

Indefero Commit Details


Date:2010-10-03 17:23:08 (14 years 2 months ago)
Author:Thomas Keller
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:0c575ccc740828d61dd42c5305e61c19e1f1d1df
Parents: eebdc5ad1267683fc021d548ce1d211227514b06
Message:If a symbol is printed without a value list at the very end of a basic_io dump, we might access a non-existing character position. This has been fixed and the string length calculation is now only done once.

Changes:

File differences

src/IDF/Scm/Monotone/BasicIO.php
3838
3939
4040
41
4142
42
43
4344
44
45
4546
4647
4748
48
49
4950
5051
5152
......
5354
5455
5556
57
58
59
5660
5761
5862
......
6771
6872
6973
70
74
7175
7276
7377
......
7579
7680
7781
78
82
7983
8084
8185
{
$pos = 0;
$stanzas = array();
$length = strlen($in);
while ($pos < strlen($in)) {
while ($pos < $length) {
$stanza = array();
while ($pos < strlen($in)) {
while ($pos < $length) {
if ($in[$pos] == "\n") break;
$stanzaLine = array('key' => '', 'values' => array(), 'hash' => null);
while ($pos < strlen($in)) {
while ($pos < $length) {
$ch = $in[$pos];
if ($ch == '"' || $ch == '[') break;
++$pos;
$stanzaLine['key'] .= $ch;
}
// symbol w/o a value list
if ($pos >= $length || $in[$pos] == "\n") break;
if ($in[$pos] == '[') {
unset($stanzaLine['values']);
++$pos; // opening square bracket
while ($in[$pos] == '"') {
++$pos; // opening quote
$stanzaLine['values'][$valCount] = '';
while ($pos < strlen($in)) {
while ($pos < $length) {
$ch = $in[$pos]; $pr = $in[$pos-1];
if ($ch == '"' && $pr != '\\') break;
++$pos;
}
++$pos; // closing quote
if ($pos >= strlen($in))
if ($pos >= $length)
break;
if ($in[$pos] == ' ') {

Archive Download the corresponding diff file

Page rendered in 0.08155s using 13 queries.