@@ -1095,7 +1095,7 @@ typedef struct yaml_parser_s {
1095
1095
yaml_error_type_t error ;
1096
1096
/** Error description. */
1097
1097
const char * problem ;
1098
- /** The byte about which the problem occured . */
1098
+ /** The byte about which the problem occurred . */
1099
1099
size_t problem_offset ;
1100
1100
/** The problematic value (@c -1 is none). */
1101
1101
int problem_value ;
@@ -1335,7 +1335,7 @@ yaml_parser_delete(yaml_parser_t *parser);
1335
1335
* Set a string input.
1336
1336
*
1337
1337
* Note that the @a input pointer must be valid while the @a parser object
1338
- * exists. The application is responsible for destroing @a input after
1338
+ * exists. The application is responsible for destroying @a input after
1339
1339
* destroying the @a parser.
1340
1340
*
1341
1341
* @param[in,out] parser A parser object.
@@ -1456,6 +1456,20 @@ yaml_parser_parse(yaml_parser_t *parser, yaml_event_t *event);
1456
1456
YAML_DECLARE (int )
1457
1457
yaml_parser_load (yaml_parser_t * parser , yaml_document_t * document );
1458
1458
1459
+ /**
1460
+ * Set the maximum depth of nesting.
1461
+ *
1462
+ * Default: 1000
1463
+ *
1464
+ * Each nesting level increases the stack and the number of previous
1465
+ * starting events that the parser has to check.
1466
+ *
1467
+ * @param[in] max The maximum number of allowed nested events
1468
+ */
1469
+
1470
+ YAML_DECLARE (void )
1471
+ yaml_set_max_nest_level (int max );
1472
+
1459
1473
/** @} */
1460
1474
1461
1475
/**
@@ -1734,7 +1748,7 @@ typedef struct yaml_emitter_s {
1734
1748
size_t length ;
1735
1749
/** Does the scalar contain line breaks? */
1736
1750
int multiline ;
1737
- /** Can the scalar be expessed in the flow plain style? */
1751
+ /** Can the scalar be expressed in the flow plain style? */
1738
1752
int flow_plain_allowed ;
1739
1753
/** Can the scalar be expressed in the block plain style? */
1740
1754
int block_plain_allowed ;
@@ -1950,7 +1964,7 @@ yaml_emitter_close(yaml_emitter_t *emitter);
1950
1964
/**
1951
1965
* Emit a YAML document.
1952
1966
*
1953
- * The documen object may be generated using the yaml_parser_load() function
1967
+ * The document object may be generated using the yaml_parser_load() function
1954
1968
* or the yaml_document_initialize() function. The emitter takes the
1955
1969
* responsibility for the document object and destroys its content after
1956
1970
* it is emitted. The document object is destroyed even if the function fails.
0 commit comments