diff options
author | krion <krion@FreeBSD.org> | 2004-04-03 14:35:22 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2004-04-03 14:35:22 +0800 |
commit | 137acbe66412cf10a872531fe66e10af4256f9fd (patch) | |
tree | a666158b60bedae5492c777463c893fe2fe83ec3 /databases | |
parent | 78f5c5b5e261a53fdfd4be749130387b4b13a994 (diff) | |
download | freebsd-ports-gnome-137acbe66412cf10a872531fe66e10af4256f9fd.tar.gz freebsd-ports-gnome-137acbe66412cf10a872531fe66e10af4256f9fd.tar.zst freebsd-ports-gnome-137acbe66412cf10a872531fe66e10af4256f9fd.zip |
- Fix segfault due to a NULL pointer in strcmp function.
PR: ports/65101
Submitted by: Jie Gao <gaoj@cpsc.ucalgary.ca>
Diffstat (limited to 'databases')
-rw-r--r-- | databases/dbf/files/patch-dbf.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/databases/dbf/files/patch-dbf.c b/databases/dbf/files/patch-dbf.c index cf2ce4073bc5..4a9c1f003094 100644 --- a/databases/dbf/files/patch-dbf.c +++ b/databases/dbf/files/patch-dbf.c @@ -1,6 +1,15 @@ ---- dbf.c.orig Tue Nov 11 16:48:07 2003 -+++ dbf.c Tue Nov 11 16:48:19 2003 -@@ -315,6 +315,7 @@ +--- dbf.c.orig Thu Nov 20 05:22:03 2003 ++++ dbf.c Fri Apr 2 17:01:43 2004 +@@ -341,7 +341,7 @@ + if (verbosity > 0) + banner(); + +- if(0 == strcmp(export_filename, "-")) ++ if(!export_filename || (0 == strcmp(export_filename, "-"))) + output = stdout; + else + output = export_open(export_filename); +@@ -357,6 +357,7 @@ exit(1); if (writeLine) { @@ -8,7 +17,7 @@ if ((record = malloc(record_length + 1)) == NULL) { perror("malloc"); exit(1); } -@@ -327,7 +328,6 @@ +@@ -369,7 +370,6 @@ //lseek(dbfhandle, rotate2b(db->header_length) + 1, SEEK_SET); /* At this point we look if the following data set is deleted */ |