	protected function getFullPath($path, $base) {
		$separator = $this->separator;
		$systemroot = $this->systemRoot;

		$sepquoted = preg_quote($separator, '#');

		// normalize `/../`
		$normreg = '#('.$sepquoted.')[^'.$sepquoted.']+'.$sepquoted.'\.\.'.$sepquoted.'#';
		while(preg_match($normreg, $path)) {
			$path = preg_replace($normreg, '$1', $path);
		}
		
		// 'Here'
		if ($path === '' || $path === '.' . $separator) return $base;
		
		// Absolute path
		if ($path[0] === $separator || strpos($path, $systemroot) === 0) {
			return $path;
		}
		
		$preg_separator = '#' . $sepquoted . '#';
		
		// Relative path from 'Here'
		if (substr($path, 0, 2) === '.' . $separator || $path[0] !== '.' || substr($path, 0, 3) !== '..' . $separator) {
			$arrn = preg_split($preg_separator, $path, -1, PREG_SPLIT_NO_EMPTY);
			if ($arrn[0] !== '.') {
				array_unshift($arrn, '.');
			}
			$arrn[0] = $base;
			return join($separator, $arrn);
		}
		
		// Relative path from dirname()
		if (substr($path, 0, 3) === '../') {
			$arrn = preg_split($preg_separator, $path, -1, PREG_SPLIT_NO_EMPTY);
			$arrp = preg_split($preg_separator, $base, -1, PREG_SPLIT_NO_EMPTY);
		
			while (! empty($arrn) && $arrn[0] === '..') {
				array_shift($arrn);
				array_pop($arrp);
			}
			$path = ! empty($arrp) ? $systemroot . join($separator, array_merge($arrp, $arrn)) :
				(! empty($arrn) ? $systemroot . join($separator, $arrn) : $systemroot);
		}
		
		return $path;
	}
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.