projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81e0a2f
)
gstrfuncs: Add missing preconditions to g_str_match_string()
author
Philip Withnall
<philip.withnall@collabora.co.uk>
Thu, 28 Nov 2013 20:39:56 +0000
(20:39 +0000)
committer
Philip Withnall
<philip@tecnocode.co.uk>
Sun, 4 May 2014 17:21:20 +0000
(18:21 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=113075
glib/gstrfuncs.c
patch
|
blob
|
history
diff --git
a/glib/gstrfuncs.c
b/glib/gstrfuncs.c
index
0c50dfb
..
1292266
100644
(file)
--- 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);