[glib/wip/pwithnall/resolver-fuzzing: 1/3] gthreadedresolver: Export g_resolver_records_from_res_query()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/pwithnall/resolver-fuzzing: 1/3] gthreadedresolver: Export g_resolver_records_from_res_query()
- Date: Wed, 15 Dec 2021 16:57:37 +0000 (UTC)
commit 49e667d250ca4e5ba9cb9c93c467c6196d16601c
Author: Patrick Griffis <pgriffis igalia com>
Date: Wed Dec 15 16:53:41 2021 +0000
gthreadedresolver: Export g_resolver_records_from_res_query()
While it’s not a supported public part of the API, exporting this
symbol from the library means we can easily test the DNS record parser,
which is important to do since it handles untrusted data from the
network.
gio/gthreadedresolver.c | 2 +-
gio/gthreadedresolver.h | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index 93794b5b3..1a339ecf1 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -652,7 +652,7 @@ g_resolver_record_type_to_rrtype (GResolverRecordType type)
g_return_val_if_reached (-1);
}
-static GList *
+GList *
g_resolver_records_from_res_query (const gchar *rrname,
gint rrtype,
guchar *answer,
diff --git a/gio/gthreadedresolver.h b/gio/gthreadedresolver.h
index 5900d6a14..9b0f98222 100644
--- a/gio/gthreadedresolver.h
+++ b/gio/gthreadedresolver.h
@@ -42,6 +42,15 @@ typedef struct {
GLIB_AVAILABLE_IN_ALL
GType g_threaded_resolver_get_type (void) G_GNUC_CONST;
+/* Used for a private test API */
+GLIB_AVAILABLE_IN_ALL
+GList *g_resolver_records_from_res_query (const gchar *rrname,
+ gint rrtype,
+ guchar *answer,
+ gint len,
+ gint herr,
+ GError **error);
+
G_END_DECLS
#endif /* __G_RESOLVER_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]