mirror of
https://github.com/bdnugget/kcgi.git
synced 2026-11-07 05:47:27 +00:00
When reaching the hard-coded limit to JSON scope stack size, return ENOMEM
instead of aborting.
This commit is contained in:
1 parent
719decfc86
commit
36e6cdcddf
4 files changed
+10
-3
No files matched your search
@@ -39,6 +39,10 @@ enum kjsontype {
|
||||
KJSON_STRING
|
||||
};
|
||||
|
||||
/*
|
||||
* The maximum number of JSON scopes allowed.
|
||||
* Once this has been reached, new scopes will return KCGI_ENOMEM.
|
||||
*/
|
||||
#define KJSON_STACK_MAX 128
|
||||
|
||||
struct kjsonscope {
|
||||
|
||||
@@ -72,7 +72,8 @@ indicating the error state.
|
||||
.It Dv KCGI_OK
|
||||
Success (not an error).
|
||||
.It Dv KCGI_ENOMEM
|
||||
Internal memory allocation failure.
|
||||
Internal memory allocation failure, including reaching the maximum
|
||||
number of possible JSON scopes.
|
||||
.It Dv KCGI_HUP
|
||||
The output connection has been terminated.
|
||||
For FastCGI connections, the current connection should be released with
|
||||
|
||||
@@ -72,7 +72,8 @@ indicating the error state.
|
||||
.It Dv KCGI_OK
|
||||
Success (not an error).
|
||||
.It Dv KCGI_ENOMEM
|
||||
Internal memory allocation failure.
|
||||
Internal memory allocation failure, including reaching the maximum
|
||||
number of possible JSON scopes.
|
||||
.It Dv KCGI_HUP
|
||||
The output connection has been terminated.
|
||||
For FastCGI connections, the current connection should be released with
|
||||
|
||||
@@ -73,7 +73,8 @@ indicating the error state.
|
||||
.It Dv KCGI_OK
|
||||
Success (not an error).
|
||||
.It Dv KCGI_ENOMEM
|
||||
Internal memory allocation failure.
|
||||
Internal memory allocation failure, including reaching the maximum
|
||||
number of possible JSON scopes.
|
||||
.It Dv KCGI_HUP
|
||||
The output connection has been terminated.
|
||||
For FastCGI connections, the current connection should be released with
|
||||
|
||||
Reference in new issue
Block a user