Skip to content
Permalink
Browse files

Fixed possible undefined offset and negative string length

  • Loading branch information...
derickr committed Aug 12, 2019
1 parent 6f0b683 commit a88fd7df94f75812cbfbcc382762e9520759fb5d
Showing with 6 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +5 −0 contrib/tracefile-analyser.php
@@ -34,6 +34,7 @@
/scan_makefile_in.awk
/config.guess
/*sw*
/contrib/*sw*
tags
/config.log
/libtool
@@ -50,6 +50,7 @@
$maxLen = strlen( $name );
}
}
$maxLen = max( $maxLen, 8 );
echo "Showing the {$elements} most costly calls sorted by '{$sortKey}'.\n\n";
@@ -185,6 +186,10 @@ private function parseLine( $line )
$dTime = $time - $prevTime;
$dMemory = $memory - $prevMem;
if ( ! array_key_exists( $depth - 1, $this->stack ) )
{
$this->stack[$depth - 1] = array( '', 0, 0, 0, 0 );
}
$this->stack[$depth - 1][3] += $dTime;
$this->stack[$depth - 1][4] += $dMemory;

0 comments on commit a88fd7d

Please sign in to comment.
You can’t perform that action at this time.