summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintae jeon <intae.jeon@samsung.com>2016-10-23 18:04:25 -0700
committerintae jeon <intae.jeon@samsung.com>2016-10-23 22:58:09 -0700
commit24b61ff9792832e52f55eeebd778cb2d25a06d02 (patch)
treefa56ed628c832bb4a2c81c72176c63a664fc1ba2
parentb6c6bf64e13ee30f0bf6de60de30047df322a34b (diff)
downloademail-service-24b61ff9792832e52f55eeebd778cb2d25a06d02.tar.gz
email-service-24b61ff9792832e52f55eeebd778cb2d25a06d02.tar.bz2
email-service-24b61ff9792832e52f55eeebd778cb2d25a06d02.zip
Revert "Revert "Crash occurred when "" is inputted as new mailbox name when creating or renaming folder""
This reverts commit 83bde1cf3ab900da83642881bacb6e939f1f7990. Change-Id: I5bf6fc6875a6d026cda1929982b1ed4e0d25a3aa
-rwxr-xr-xemail-core/email-core-mailbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/email-core/email-core-mailbox.c b/email-core/email-core-mailbox.c
index 54d569c..a55032a 100755
--- a/email-core/email-core-mailbox.c
+++ b/email-core/email-core-mailbox.c
@@ -475,7 +475,7 @@ INTERNAL_FUNC int emcore_create_mailbox(char *multi_user_name, email_mailbox_t *
int incomming_server_type = 0;
int mail_slot_size = 25;
- if (new_mailbox == NULL || new_mailbox->mailbox_name == NULL) {
+ if (new_mailbox == NULL || new_mailbox->mailbox_name == NULL || *(new_mailbox->mailbox_name) == '\0' ) {
err = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;
}
@@ -743,7 +743,7 @@ INTERNAL_FUNC int emcore_rename_mailbox(char *multi_user_name,
char *enc_mailbox_name = NULL;
char *new_mailbox_name = NULL;
- if (input_mailbox_id == 0 || input_new_mailbox_name == NULL || input_new_mailbox_alias == NULL) {
+ if (input_mailbox_id == 0 || input_new_mailbox_name == NULL || *input_new_mailbox_name == '\0' || input_new_mailbox_alias == NULL || *input_new_mailbox_alias == '\0') {
EM_DEBUG_EXCEPTION("EMAIL_ERROR_INVALID_PARAM");
err = EMAIL_ERROR_INVALID_PARAM;
goto FINISH_OFF;