]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
sdbox: Make sure we don't crash when altmove-flag is set but alt path is missing.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 26 May 2016 18:40:30 +0000 (21:40 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 26 May 2016 18:41:21 +0000 (21:41 +0300)
src/lib-storage/index/dbox-single/sdbox-file.c

index 56e5b98cdfe2a81baa52f68a48336fa052611fda..a0401dcfa751bb981d6b50716650adf5b6688713 100644 (file)
@@ -302,6 +302,8 @@ int sdbox_file_move(struct dbox_file *file, bool alt_path)
 
        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 */