mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-01 10:11:20 +08:00
Fixed segmentation fault with text representation
This commit is contained in:
@@ -194,7 +194,7 @@ vector_in(PG_FUNCTION_ARGS)
|
||||
pt = strtok(NULL, ",");
|
||||
}
|
||||
|
||||
if (*stringEnd != ']')
|
||||
if (stringEnd == NULL || *stringEnd != ']')
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
||||
errmsg("malformed vector literal: \"%s\"", lit),
|
||||
|
||||
Reference in New Issue
Block a user