1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00

- Fix segfault due to a NULL pointer in strcmp function.

PR:		ports/65101
Submitted by:	Jie Gao <gaoj@cpsc.ucalgary.ca>
This commit is contained in:
Kirill Ponomarev 2004-04-03 06:35:22 +00:00
parent db024caf95
commit ba63be234f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=106008

View File

@ -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 */