This repository has been archived on 2024-11-07. You can view files and clone it, but cannot push or open issues or pull requests.
mailx/mailx-12.5-fname-null.patch

13 lines
458 B
Diff
Raw Permalink Normal View History

diff -upr mailx-12.5.orig/names.c mailx-12.5/names.c
--- mailx-12.5.orig/names.c 2006-03-04 01:32:16.000000000 +0100
+++ mailx-12.5/names.c 2012-11-01 15:28:43.883573793 +0100
@@ -357,7 +357,7 @@ outof(struct name *names, FILE *fo, stru
free_child(pid);
} else {
int f;
- if ((fout = Zopen(fname, "a", NULL)) == NULL) {
+ if ((fname == NULL) || ((fout = Zopen(fname, "a", NULL)) == NULL)) {
perror(fname);
senderr++;
goto cant;