Gitweb links:
...log
http://git.netsurf-browser.org/libhubbub.git/shortlog/5109d5233430635c390f29c63b7381ced0df5d8b
...commit
http://git.netsurf-browser.org/libhubbub.git/commit/5109d5233430635c390f29c63b7381ced0df5d8b
...tree
http://git.netsurf-browser.org/libhubbub.git/tree/5109d5233430635c390f29c63b7381ced0df5d8b
The branch, master has been updated
via 5109d5233430635c390f29c63b7381ced0df5d8b (commit)
via f672c6c269351154eb6b294a5f4aeb955d13839a (commit)
via 872f23f491f7559ee05022e4da7c2b3dffb6ec7a (commit)
via 0a9f517ff51340fa27dfc2eb1554d1ed16ebcc41 (commit)
via 9aa437d5bd57aa0c3f68cd88fdcc58f5cd365aeb (commit)
from eb7d9b3580e3d1abd7878f6002c9fb68969838bd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libhubbub.git/commit/?id=5109d5233430635c390f29c63b7381ced0df5d8b
commit 5109d5233430635c390f29c63b7381ced0df5d8b
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Tests: Squash leaked chunks allocations.
diff --git a/test/tree-buf.c b/test/tree-buf.c
index 83447a2..94ee306 100644
--- a/test/tree-buf.c
+++ b/test/tree-buf.c
@@ -247,6 +247,7 @@ int main(int argc, char **argv)
printf("PASS\n");
+ free(chunks);
fclose(fp);
free(got.buf);
commitdiff
http://git.netsurf-browser.org/libhubbub.git/commit/?id=f672c6c269351154eb6b294a5f4aeb955d13839a
commit f672c6c269351154eb6b294a5f4aeb955d13839a
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Tests: Squash leak of hubbub parser.
Found by address sanitizer.
diff --git a/test/tree2.c b/test/tree2.c
index dbebc99..6d8fb52 100644
--- a/test/tree2.c
+++ b/test/tree2.c
@@ -228,7 +228,10 @@ int main(int argc, char **argv)
buf_clear(&got);
buf_clear(&expected);
- hubbub_parser_destroy(parser);
+ if (parser != NULL) {
+ hubbub_parser_destroy(parser);
+ parser = NULL;
+ }
while (Document) {
node_t *victim = Document;
Document = victim->next;
@@ -316,7 +319,10 @@ int main(int argc, char **argv)
printf("%s", got.buf);
}
- hubbub_parser_destroy(parser);
+ if (parser != NULL) {
+ hubbub_parser_destroy(parser);
+ parser = NULL;
+ }
while (Document) {
node_t *victim = Document;
Document = victim->next;
@@ -331,6 +337,10 @@ int main(int argc, char **argv)
free(got.buf);
free(expected.buf);
+ if (parser != NULL) {
+ hubbub_parser_destroy(parser);
+ }
+
return 0;
}
commitdiff
http://git.netsurf-browser.org/libhubbub.git/commit/?id=872f23f491f7559ee05022e4da7c2b3dffb6ec7a
commit 872f23f491f7559ee05022e4da7c2b3dffb6ec7a
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Tests: Fix passing NULL to qsort.
test/tree2.c:882:3: runtime error: null pointer passed as argument 1, which
is declared to never be null
diff --git a/test/tree2.c b/test/tree2.c
index 73c6f92..dbebc99 100644
--- a/test/tree2.c
+++ b/test/tree2.c
@@ -879,9 +879,12 @@ static void node_print(buf_t *buf, node_t *node, unsigned
depth)
buf_add(buf, node->data.element.name);
buf_add(buf, ">\n");
- qsort(node->data.element.attrs, node->data.element.n_attrs,
- sizeof *node->data.element.attrs,
- compare_attrs);
+ if (node->data.element.n_attrs > 0) {
+ qsort(node->data.element.attrs,
+ node->data.element.n_attrs,
+ sizeof *node->data.element.attrs,
+ compare_attrs);
+ }
for (i = 0; i < node->data.element.n_attrs; i++) {
indent(buf, depth + 1);
commitdiff
http://git.netsurf-browser.org/libhubbub.git/commit/?id=0a9f517ff51340fa27dfc2eb1554d1ed16ebcc41
commit 0a9f517ff51340fa27dfc2eb1554d1ed16ebcc41
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Tests: Squash json object leak in tests.
diff --git a/test/tokeniser3.c b/test/tokeniser3.c
index 949ddd0..e33d018 100644
--- a/test/tokeniser3.c
+++ b/test/tokeniser3.c
@@ -98,6 +98,8 @@ int main(int argc, char **argv)
run_test(&ctx);
}
+ json_object_put(json);
+
printf("PASS\n");
return 0;
commitdiff
http://git.netsurf-browser.org/libhubbub.git/commit/?id=9aa437d5bd57aa0c3f68cd88fdcc58f5cd365aeb
commit 9aa437d5bd57aa0c3f68cd88fdcc58f5cd365aeb
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Tests: Squash implicit fallthrough error.
test/tree2.c:239:10: error: this statement may fall through
[-Werror=implicit-fallthrough=]
diff --git a/test/tree2.c b/test/tree2.c
index d5d4c72..73c6f92 100644
--- a/test/tree2.c
+++ b/test/tree2.c
@@ -237,6 +237,7 @@ int main(int argc, char **argv)
Document = NULL;
state = EXPECT_DATA;
+ /* Fall through. */
case EXPECT_DATA:
if (strcmp(line, "#data\n") == 0) {
-----------------------------------------------------------------------
Summary of changes:
test/tokeniser3.c | 2 ++
test/tree-buf.c | 1 +
test/tree2.c | 24 +++++++++++++++++++-----
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/test/tokeniser3.c b/test/tokeniser3.c
index 949ddd0..e33d018 100644
--- a/test/tokeniser3.c
+++ b/test/tokeniser3.c
@@ -98,6 +98,8 @@ int main(int argc, char **argv)
run_test(&ctx);
}
+ json_object_put(json);
+
printf("PASS\n");
return 0;
diff --git a/test/tree-buf.c b/test/tree-buf.c
index 83447a2..94ee306 100644
--- a/test/tree-buf.c
+++ b/test/tree-buf.c
@@ -247,6 +247,7 @@ int main(int argc, char **argv)
printf("PASS\n");
+ free(chunks);
fclose(fp);
free(got.buf);
diff --git a/test/tree2.c b/test/tree2.c
index d5d4c72..6d8fb52 100644
--- a/test/tree2.c
+++ b/test/tree2.c
@@ -228,7 +228,10 @@ int main(int argc, char **argv)
buf_clear(&got);
buf_clear(&expected);
- hubbub_parser_destroy(parser);
+ if (parser != NULL) {
+ hubbub_parser_destroy(parser);
+ parser = NULL;
+ }
while (Document) {
node_t *victim = Document;
Document = victim->next;
@@ -237,6 +240,7 @@ int main(int argc, char **argv)
Document = NULL;
state = EXPECT_DATA;
+ /* Fall through. */
case EXPECT_DATA:
if (strcmp(line, "#data\n") == 0) {
@@ -315,7 +319,10 @@ int main(int argc, char **argv)
printf("%s", got.buf);
}
- hubbub_parser_destroy(parser);
+ if (parser != NULL) {
+ hubbub_parser_destroy(parser);
+ parser = NULL;
+ }
while (Document) {
node_t *victim = Document;
Document = victim->next;
@@ -330,6 +337,10 @@ int main(int argc, char **argv)
free(got.buf);
free(expected.buf);
+ if (parser != NULL) {
+ hubbub_parser_destroy(parser);
+ }
+
return 0;
}
@@ -878,9 +889,12 @@ static void node_print(buf_t *buf, node_t *node, unsigned
depth)
buf_add(buf, node->data.element.name);
buf_add(buf, ">\n");
- qsort(node->data.element.attrs, node->data.element.n_attrs,
- sizeof *node->data.element.attrs,
- compare_attrs);
+ if (node->data.element.n_attrs > 0) {
+ qsort(node->data.element.attrs,
+ node->data.element.n_attrs,
+ sizeof *node->data.element.attrs,
+ compare_attrs);
+ }
for (i = 0; i < node->data.element.n_attrs; i++) {
indent(buf, depth + 1);
--
HTML5 parser library
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org