1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Ensure that all four callbacks are provided when registering a window function

(otherwise SQLITE_MISUSE is returned).

FossilOrigin-Name: 5720dcd8b111b1f8712c8fb4b441ccb129e838db8c26a6e9e0f095dc6a851f6b
This commit is contained in:
dan
2018-06-18 17:36:41 +00:00
parent 660af939b0
commit f87e10c75e
5 changed files with 58 additions and 9 deletions

View File

@@ -1696,6 +1696,7 @@ int sqlite3CreateFunc(
(xSFunc && (xFinal || xStep)) ||
(!xSFunc && (xFinal && !xStep)) ||
(!xSFunc && (!xFinal && xStep)) ||
((xValue || xInverse) && (!xStep || !xFinal || !xValue || !xInverse)) ||
(nArg<-1 || nArg>SQLITE_MAX_FUNCTION_ARG) ||
(255<(nName = sqlite3Strlen30( zFunctionName))) ){
return SQLITE_MISUSE_BKPT;