Module Name: othersrc
Committed By: agc
Date: Fri Jan 11 05:10:19 UTC 2013
Modified Files:
othersrc/external/bsd/netdiff/bin/netdiff: 002.expected 003.expected
004.expected 006.expected
othersrc/external/bsd/netdiff/bin/qdiff: 002.expected 003.expected
004.expected 006.expected
othersrc/external/bsd/netdiff/dist: diff_subr.c
Log Message:
Feedback from fuzz tests - check input arguments to exported functions
Modify the expected output files for mtimes on the tests after the import
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
othersrc/external/bsd/netdiff/bin/netdiff/002.expected \
othersrc/external/bsd/netdiff/bin/netdiff/003.expected \
othersrc/external/bsd/netdiff/bin/netdiff/004.expected \
othersrc/external/bsd/netdiff/bin/netdiff/006.expected
cvs rdiff -u -r1.1.1.1 -r1.2 \
othersrc/external/bsd/netdiff/bin/qdiff/002.expected \
othersrc/external/bsd/netdiff/bin/qdiff/003.expected \
othersrc/external/bsd/netdiff/bin/qdiff/004.expected \
othersrc/external/bsd/netdiff/bin/qdiff/006.expected
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/netdiff/dist/diff_subr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/external/bsd/netdiff/bin/netdiff/002.expected
diff -u othersrc/external/bsd/netdiff/bin/netdiff/002.expected:1.1.1.1 othersrc/external/bsd/netdiff/bin/netdiff/002.expected:1.2
--- othersrc/external/bsd/netdiff/bin/netdiff/002.expected:1.1.1.1 Thu Jan 10 08:17:11 2013
+++ othersrc/external/bsd/netdiff/bin/netdiff/002.expected Fri Jan 11 05:10:19 2013
@@ -1,5 +1,5 @@
-*** f1 Sun Jan 6 21:29:26 2013
---- f2 Sun Jan 6 21:29:26 2013
+*** f1 Thu Jan 10 00:17:11 2013
+--- f2 Thu Jan 10 00:17:11 2013
***************
*** 1,3 ****
--- 1,27 ----
Index: othersrc/external/bsd/netdiff/bin/netdiff/003.expected
diff -u othersrc/external/bsd/netdiff/bin/netdiff/003.expected:1.1.1.1 othersrc/external/bsd/netdiff/bin/netdiff/003.expected:1.2
--- othersrc/external/bsd/netdiff/bin/netdiff/003.expected:1.1.1.1 Thu Jan 10 08:17:11 2013
+++ othersrc/external/bsd/netdiff/bin/netdiff/003.expected Fri Jan 11 05:10:19 2013
@@ -1,5 +1,5 @@
---- f1 2013-01-06 21:29:26.000000000 -0800
-+++ f2 2013-01-06 21:29:26.000000000 -0800
+--- f1 2013-01-10 00:17:11.000000000 -0800
++++ f2 2013-01-10 00:17:11.000000000 -0800
@@ -1,3 +1,27 @@
+/*-
+ * Copyright (c) 2013 Alistair Crooks <[email protected]>
Index: othersrc/external/bsd/netdiff/bin/netdiff/004.expected
diff -u othersrc/external/bsd/netdiff/bin/netdiff/004.expected:1.1.1.1 othersrc/external/bsd/netdiff/bin/netdiff/004.expected:1.2
--- othersrc/external/bsd/netdiff/bin/netdiff/004.expected:1.1.1.1 Thu Jan 10 08:17:11 2013
+++ othersrc/external/bsd/netdiff/bin/netdiff/004.expected Fri Jan 11 05:10:19 2013
@@ -6,9 +6,9 @@ diff /usr/src/sbin/Makefile /d/thinfs-sr
> SUBDIR+= mount_thinfs
diff /usr/src/sbin/Makefile.inc /d/thinfs-src/sbin/Makefile.inc
1c1
-< # $NetBSD: 004.expected,v 1.1.1.1 2013/01/10 08:17:11 agc Exp $
+< # $NetBSD: 004.expected,v 1.2 2013/01/11 05:10:19 agc Exp $
---
-> # $NetBSD: 004.expected,v 1.1.1.1 2013/01/10 08:17:11 agc Exp $
+> # $NetBSD: 004.expected,v 1.2 2013/01/11 05:10:19 agc Exp $
6c6
< WARNS?= 4
---
Index: othersrc/external/bsd/netdiff/bin/netdiff/006.expected
diff -u othersrc/external/bsd/netdiff/bin/netdiff/006.expected:1.1.1.1 othersrc/external/bsd/netdiff/bin/netdiff/006.expected:1.2
--- othersrc/external/bsd/netdiff/bin/netdiff/006.expected:1.1.1.1 Thu Jan 10 08:17:11 2013
+++ othersrc/external/bsd/netdiff/bin/netdiff/006.expected Fri Jan 11 05:10:19 2013
@@ -1,5 +1,5 @@
---- f1 2013-01-06 21:29:26.000000000 -0800
-+++ f2 2013-01-06 21:29:26.000000000 -0800
+--- f1 2013-01-10 00:17:11.000000000 -0800
++++ f2 2013-01-10 00:17:11.000000000 -0800
@@ -1,3 +1,27 @@
+/*-
+ * Copyright (c) 2013 Alistair Crooks <[email protected]>
Index: othersrc/external/bsd/netdiff/bin/qdiff/002.expected
diff -u othersrc/external/bsd/netdiff/bin/qdiff/002.expected:1.1.1.1 othersrc/external/bsd/netdiff/bin/qdiff/002.expected:1.2
--- othersrc/external/bsd/netdiff/bin/qdiff/002.expected:1.1.1.1 Thu Jan 10 08:17:11 2013
+++ othersrc/external/bsd/netdiff/bin/qdiff/002.expected Fri Jan 11 05:10:19 2013
@@ -1,5 +1,5 @@
-*** /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f1 Sun Jan 6 21:29:26 2013
---- /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f2 Sun Jan 6 21:29:26 2013
+*** /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f1 Thu Jan 10 00:17:11 2013
+--- /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f2 Thu Jan 10 00:17:11 2013
***************
*** 1,3 ****
--- 1,27 ----
Index: othersrc/external/bsd/netdiff/bin/qdiff/003.expected
diff -u othersrc/external/bsd/netdiff/bin/qdiff/003.expected:1.1.1.1 othersrc/external/bsd/netdiff/bin/qdiff/003.expected:1.2
--- othersrc/external/bsd/netdiff/bin/qdiff/003.expected:1.1.1.1 Thu Jan 10 08:17:11 2013
+++ othersrc/external/bsd/netdiff/bin/qdiff/003.expected Fri Jan 11 05:10:19 2013
@@ -1,5 +1,5 @@
---- /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f1 2013-01-06 21:29:26.000000000 -0800
-+++ /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f2 2013-01-06 21:29:26.000000000 -0800
+--- /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f1 2013-01-10 00:17:11.000000000 -0800
++++ /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f2 2013-01-10 00:17:11.000000000 -0800
@@ -1,3 +1,27 @@
+/*-
+ * Copyright (c) 2013 Alistair Crooks <[email protected]>
Index: othersrc/external/bsd/netdiff/bin/qdiff/004.expected
diff -u othersrc/external/bsd/netdiff/bin/qdiff/004.expected:1.1.1.1 othersrc/external/bsd/netdiff/bin/qdiff/004.expected:1.2
--- othersrc/external/bsd/netdiff/bin/qdiff/004.expected:1.1.1.1 Thu Jan 10 08:17:11 2013
+++ othersrc/external/bsd/netdiff/bin/qdiff/004.expected Fri Jan 11 05:10:19 2013
@@ -6,9 +6,9 @@ diff /usr/src/sbin/Makefile /d/thinfs-sr
> SUBDIR+= mount_thinfs
diff /usr/src/sbin/Makefile.inc /d/thinfs-src/sbin/Makefile.inc
1c1
-< # $NetBSD: 004.expected,v 1.1.1.1 2013/01/10 08:17:11 agc Exp $
+< # $NetBSD: 004.expected,v 1.2 2013/01/11 05:10:19 agc Exp $
---
-> # $NetBSD: 004.expected,v 1.1.1.1 2013/01/10 08:17:11 agc Exp $
+> # $NetBSD: 004.expected,v 1.2 2013/01/11 05:10:19 agc Exp $
6c6
< WARNS?= 4
---
Index: othersrc/external/bsd/netdiff/bin/qdiff/006.expected
diff -u othersrc/external/bsd/netdiff/bin/qdiff/006.expected:1.1.1.1 othersrc/external/bsd/netdiff/bin/qdiff/006.expected:1.2
--- othersrc/external/bsd/netdiff/bin/qdiff/006.expected:1.1.1.1 Thu Jan 10 08:17:11 2013
+++ othersrc/external/bsd/netdiff/bin/qdiff/006.expected Fri Jan 11 05:10:19 2013
@@ -1,5 +1,5 @@
---- /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f1 2013-01-06 21:29:26.000000000 -0800
-+++ /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f2 2013-01-06 21:29:26.000000000 -0800
+--- /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f1 2013-01-10 00:17:11.000000000 -0800
++++ /usr/othersrc/external/bsd/netdiff/bin/qdiff/../netdiff/f2 2013-01-10 00:17:11.000000000 -0800
@@ -1,3 +1,27 @@
+/*-
+ * Copyright (c) 2013 Alistair Crooks <[email protected]>
Index: othersrc/external/bsd/netdiff/dist/diff_subr.c
diff -u othersrc/external/bsd/netdiff/dist/diff_subr.c:1.1.1.1 othersrc/external/bsd/netdiff/dist/diff_subr.c:1.2
--- othersrc/external/bsd/netdiff/dist/diff_subr.c:1.1.1.1 Thu Jan 10 08:17:11 2013
+++ othersrc/external/bsd/netdiff/dist/diff_subr.c Fri Jan 11 05:10:19 2013
@@ -72,6 +72,9 @@ diff_printf(diff_t *diff, const char *fm
char *newdiff;
char *newv;
+ if (diff == NULL || fmt == NULL) {
+ return -1;
+ }
va_start(args, fmt);
if (diff->outsize) {
cc = vasprintf(&newdiff, fmt, args);
@@ -105,6 +108,9 @@ diff_write(diff_t *diff, const void *p,
size_t newsize;
char *newv;
+ if (diff == NULL || p == NULL) {
+ return 0;
+ }
if (diff->outsize) {
if (diff->outc + cc >= diff->outsize) {
newsize = diff->outsize + cc + KB(10);