Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 1ca4467

Browse files
committed
Don't crash when memory is exhausted
Previously, returning NULL from gumbo_parser_allocate was usually unchecked. Instead, bail out with longjmp() and return NULL from gumbo_parse_with_options().
1 parent aa91b27 commit 1ca4467

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
#include "util.h"
1818

1919
#include <assert.h>
20+
#include <stdarg.h>
21+
#include <stdio.h>
2022
#include <stdlib.h>
2123
#include <string.h>
2224
#include <strings.h>
23-
#include <stdarg.h>
24-
#include <stdio.h>
2525

2626
#include "gumbo.h"
2727
#include "parser.h"

0 commit comments

Comments
 (0)