]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
sqlite3_prepare functions prepare only the next query in the string
authorNick Porter <nick@portercomputing.co.uk>
Thu, 18 Jan 2024 17:03:06 +0000 (17:03 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 22 Jan 2024 14:57:41 +0000 (14:57 +0000)
commit98f2f91b543507a44fecf6235ab18b27c8db19a3
tree1284d94c141f72a55d472da1b35638e959547ee8
parent2a5443029cc05dbf161ece11e2f3dc28b1ed194d
sqlite3_prepare functions prepare only the next query in the string

and return a pointer to the character after what was parsed - so this
provides a more robust method of parsing the SQL to execute than simply
looking for ';' followed by '\n' or '\0'.

E.g. if there are comments which end the line with a ';' that fails with
the old parsing.
In addition, if there were ';' in data inside a string, the previous
parsing would have thrown away the portion of the string before that.
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c