summaryrefslogtreecommitdiff
path: root/alpine/mailcmd.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-09-19 12:51:49 -0600
committerEduardo Chappa <chappa@washington.edu>2015-09-19 12:51:49 -0600
commit040d361422b6b5791678220366be2374107801b1 (patch)
treecddb775d654d27f15a36127b30a48a717185d1f9 /alpine/mailcmd.c
parenta5bec83c5704f49844a9232d16aab0b2b9bf633e (diff)
downloadalpine-040d361422b6b5791678220366be2374107801b1.tar.xz
* Crash when reviewing history of saving attachments.
Diffstat (limited to 'alpine/mailcmd.c')
-rw-r--r--alpine/mailcmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/alpine/mailcmd.c b/alpine/mailcmd.c
index 37d54eb4..f8ae770c 100644
--- a/alpine/mailcmd.c
+++ b/alpine/mailcmd.c
@@ -4681,8 +4681,7 @@ get_export_filename(struct pine *ps, char *filename, char *deefault,
p = get_next_hist(*history, filename, 0, NULL);
}
- if(p != NULL){
- fn = last_cmpnt(p);
+ if(p != NULL && (fn = last_cmpnt(p)) != NULL){
strncpy(dir, p, MIN(fn - p, sizeof(dir)-1));
dir[MIN(fn - p, sizeof(dir)-1)] = '\0';
if(fn - p > 1)