diff options
author | Tambet Ingo <tambet@gmail.com> | 2008-10-24 17:46:01 +0300 |
---|---|---|
committer | Tambet Ingo <tambet@gmail.com> | 2008-10-24 17:46:01 +0300 |
commit | 128021dc16729233a8e2542206d53c3e05091f20 (patch) | |
tree | 9f90206517ae7407037f7c1268d8315be7a93b68 /src/mm-util.c | |
parent | 705aa1c4041e4d12146628c07d2e808ea0d31fa2 (diff) |
Add guards to public functions to validate passed arguments.
Diffstat (limited to 'src/mm-util.c')
-rw-r--r-- | src/mm-util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mm-util.c b/src/mm-util.c index 33796ac6..46badcf3 100644 --- a/src/mm-util.c +++ b/src/mm-util.c @@ -27,6 +27,9 @@ mm_util_strip_string (GString *string, gboolean matches; char *str; + g_return_if_fail (string != NULL); + g_return_if_fail (regex != NULL); + matches = g_regex_match_full (regex, string->str, string->len, 0, 0, &match_info, NULL); if (callback) { while (g_match_info_matches (match_info)) { |