From: Adrian Jones Date: Tue, 9 Apr 2024 02:01:37 +0000 (-0700) Subject: Fix uninitialized string offset X-Git-Tag: v4.16.0~113 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=4484f5f620adbc871763a97dc5d85e37e2cdc2f2;p=adminer.git Fix uninitialized string offset This can happen if you include an unpaired single or double quote, eg: SELECT * FROM table_name WHERE field_name = 'test --- diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 7a21235d..216e36e2 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -87,7 +87,7 @@ if (!$error && $_POST) { $query .= fread($fp, 1e5); } else { $offset = $match[0][1] + strlen($s); - if ($s[0] != "\\") { + if (!$s || $s[0] != "\\") { break; } }