projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab02b62
)
* fix precondition, which could cause a crash
author
Dirk-Jan C. Binnema
<dirk-jan.binnema@nokia.com>
Fri, 4 Jan 2008 16:14:09 +0000
(16:14 +0000)
committer
Dirk-Jan C. Binnema
<dirk-jan.binnema@nokia.com>
Fri, 4 Jan 2008 16:14:09 +0000
(16:14 +0000)
pmo-trunk-r3982
src/modest-utils.c
patch
|
blob
|
history
diff --git
a/src/modest-utils.c
b/src/modest-utils.c
index
2a5981c
..
f0eb11e
100644
(file)
--- a/
src/modest-utils.c
+++ b/
src/modest-utils.c
@@
-96,7
+96,8
@@
modest_utils_create_temp_stream (const gchar *orig_name, const gchar *hash_base,
guint hash_number;
/* hmmm... maybe we need a modest_text_utils_validate_file_name? */
guint hash_number;
/* hmmm... maybe we need a modest_text_utils_validate_file_name? */
- g_return_val_if_fail (orig_name || strlen(orig_name) == 0, NULL);
+ g_return_val_if_fail (orig_name && strlen(orig_name) != 0, NULL);
+
if (strlen(orig_name) > 200) {
g_warning ("%s: filename too long ('%s')",
__FUNCTION__, orig_name);
if (strlen(orig_name) > 200) {
g_warning ("%s: filename too long ('%s')",
__FUNCTION__, orig_name);