Project

General

Profile

Actions

Bug #23036

closed

Read of uninitialized variable in t3lib_div::normalizeIPv6

Added by Oliver Klee over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-06-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

$h is read before it is initialized:

public static function normalizeIPv6($address)    {
$normalizedAddress = '';
$stageOneAddress = '';
$chunks = explode('::', $address);    // Count 2 if if address has hidden zero blocks
if (count($chunks)==2) {
$chunksLeft = explode(':', $chunks[0]);
$chunksRight = explode(':', $chunks[1]);
$left = count($chunksLeft);
$right = count($chunksRight);
// Special case: leading zero-only blocks count to 1, should be 0
if ($left==1 && strlen($chunksLeft[0])==0) $left=0;
$hiddenBlocks = 8 - ($left + $right);
$hiddenPart = '';
while ($h<$hiddenBlocks) {
$hiddenPart .= '0000:';
$h++;
}

(issue imported from #M14915)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #23593: Set readLLPHPfile to deprecated, resolve undefined vars in t3lib_divClosed2010-09-24

Actions
Actions

Also available in: Atom PDF