mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-23 00:00:06 +01:00
lejp: always allow an extra byte at the end of the string buffer for NUL
This commit is contained in:
parent
446c790525
commit
290208c19e
1 changed files with 2 additions and 2 deletions
|
@ -7209,7 +7209,7 @@ typedef signed char (*lejp_callback)(struct lejp_ctx *ctx, char reason);
|
||||||
#endif
|
#endif
|
||||||
#ifndef LEJP_STRING_CHUNK
|
#ifndef LEJP_STRING_CHUNK
|
||||||
/* must be >= 30 to assemble floats */
|
/* must be >= 30 to assemble floats */
|
||||||
#define LEJP_STRING_CHUNK 255
|
#define LEJP_STRING_CHUNK 254
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum num_flags {
|
enum num_flags {
|
||||||
|
@ -7243,7 +7243,7 @@ struct lejp_ctx {
|
||||||
uint16_t i[LEJP_MAX_INDEX_DEPTH]; /* index array */
|
uint16_t i[LEJP_MAX_INDEX_DEPTH]; /* index array */
|
||||||
uint16_t wild[LEJP_MAX_INDEX_DEPTH]; /* index array */
|
uint16_t wild[LEJP_MAX_INDEX_DEPTH]; /* index array */
|
||||||
char path[LEJP_MAX_PATH];
|
char path[LEJP_MAX_PATH];
|
||||||
char buf[LEJP_STRING_CHUNK];
|
char buf[LEJP_STRING_CHUNK + 1];
|
||||||
|
|
||||||
/* int */
|
/* int */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue