changeset 20204:932a63ff512e

sdbox: Make sure we don't crash when altmove-flag is set but alt path is missing.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 26 May 2016 21:40:30 +0300
parents f0d35d358f1b
children 923984958dbf
files src/lib-storage/index/dbox-single/sdbox-file.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-single/sdbox-file.c	Thu May 26 18:25:06 2016 +0300
+++ b/src/lib-storage/index/dbox-single/sdbox-file.c	Thu May 26 21:40:30 2016 +0300
@@ -302,6 +302,8 @@
 
 	if (dbox_file_is_in_alt(file) == alt_path)
 		return 0;
+	if (file->alt_path == NULL)
+		return 0;
 
 	if (stat(file->cur_path, &st) < 0 && errno == ENOENT) {
 		/* already expunged/moved by another session */