We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
bounds-strict
1 parent 1daf272 commit 45bea3dCopy full SHA for 45bea3d
src/libbson/src/jsonsl/jsonsl.c
@@ -111,7 +111,7 @@ jsonsl_t jsonsl_new(int nlevels)
111
112
jsn = (struct jsonsl_st *)
113
bson_malloc0(sizeof (*jsn) +
114
- ( (nlevels-1) * sizeof (struct jsonsl_state_st) )
+ ( (nlevels) * sizeof (struct jsonsl_state_st) )
115
);
116
117
jsn->levels_max = (unsigned int) nlevels;
src/libbson/src/jsonsl/jsonsl.h
@@ -568,7 +568,7 @@ struct jsonsl_st {
568
* nlevels argument passed to jsonsl_new. If you modify this structure,
569
* make sure that this member is last.
570
*/
571
- struct jsonsl_state_st stack[1];
+ struct jsonsl_state_st stack[];
572
};
573
574
0 commit comments