diff options
Diffstat (limited to 'alpine/arg.c')
-rw-r--r-- | alpine/arg.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/alpine/arg.c b/alpine/arg.c index fd987f7c..47ae0740 100644 --- a/alpine/arg.c +++ b/alpine/arg.c @@ -690,8 +690,10 @@ Loop: while(--ac > 0) path[sizeof(path)-1] = '\0'; } else{ - getcwd(dir, sizeof(path)); - build_path(path, dir, str, sizeof(path)); + if(getcwd(dir, sizeof(path)) != NULL) + build_path(path, dir, str, sizeof(path)); + else + alpine_panic(_("getcwd() call failed while parsing argument (1)")); } /* @@ -734,8 +736,10 @@ Loop: while(--ac > 0) path[sizeof(path)-1] = '\0'; } else{ - getcwd(dir, sizeof(path)); - build_path(path, dir, str, sizeof(path)); + if(getcwd(dir, sizeof(path)) != NULL) + build_path(path, dir, str, sizeof(path)); + else + alpine_panic(_("getcwd() call failed while parsing argument (2)")); } if(pine_state->pconf) |