[glib] gstrfuncs: Add missing preconditions to g_str_match_string()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gstrfuncs: Add missing preconditions to g_str_match_string()
- Date: Sun, 4 May 2014 17:22:54 +0000 (UTC)
commit 11297fd183b460abfad861cb94f9371fde487ef2
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Nov 28 20:39:56 2013 +0000
gstrfuncs: Add missing preconditions to g_str_match_string()
https://bugzilla.gnome.org/show_bug.cgi?id=113075
glib/gstrfuncs.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c
index 0c50dfb..1292266 100644
--- a/glib/gstrfuncs.c
+++ b/glib/gstrfuncs.c
@@ -2944,6 +2944,8 @@ g_str_tokenize_and_fold (const gchar *string,
{
gchar **result;
+ g_return_val_if_fail (string != NULL, NULL);
+
if (ascii_alternates && g_str_is_ascii (string))
{
*ascii_alternates = g_new0 (gchar *, 0 + 1);
@@ -3037,6 +3039,9 @@ g_str_match_string (const gchar *search_term,
gboolean matched;
gint i, j;
+ g_return_val_if_fail (search_term != NULL, FALSE);
+ g_return_val_if_fail (potential_hit != NULL, FALSE);
+
term_tokens = g_str_tokenize_and_fold (search_term, NULL, NULL);
hit_tokens = g_str_tokenize_and_fold (potential_hit, NULL, accept_alternates ? &alternates : NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]