History log of /openbsd-src/usr.bin/diff3/diff3prog.c (Results 1 – 21 of 21)
Revision Date Author Comments
# 08d4acf6 13-Apr-2021 stsp <stsp@openbsd.org>

Fix merging of files that lack a final \n at EOF after a block of common lines.

Problem reported by Josh Rickmar.
ok millert@


# c0c93af8 26-Jun-2020 stsp <stsp@openbsd.org>

Fix merging of files that lack newlines for diff(3), OpenRCS, and OpenCVS.

Merges with a file that lacks newlines (\n) were triggering a fatal error.
This could be easily reproduced with merge(1) an

Fix merging of files that lack newlines for diff(3), OpenRCS, and OpenCVS.

Merges with a file that lacks newlines (\n) were triggering a fatal error.
This could be easily reproduced with merge(1) and diff3(1):
$ echo foo > foo
$ echo bar > bar
$ echo -n baz > baz
$ merge -p foo bar baz
merge: failed to merge
$ diff3 -E foo bar baz
1a
=======
diff3prog: logic error
$

Fix this by properly handling short reads from the third file argument.
Only the third file argument triggered the problem. The other input
files were already handled correctly.

ok millert@

show more ...


# 1c690bec 18-Oct-2016 millert <millert@openbsd.org>

Using bitwise OR along with two assignments in the conditional of
a while() loop is a trap for the unwary programmer (albeit a clever
trap). Break this up into two separate assignments and using boo

Using bitwise OR along with two assignments in the conditional of
a while() loop is a trap for the unwary programmer (albeit a clever
trap). Break this up into two separate assignments and using boolean
OR for clarity. OK otto@

show more ...


# bd1f1994 16-Oct-2016 millert <millert@openbsd.org>

Remove useless n=n assignment in the first parse of a for().
It was already removed from the rcs version by nicm@.


# 0bd1216c 09-Oct-2015 deraadt <deraadt@openbsd.org>

Change all tame callers to namechange to pledge(2).


# 18cdc269 05-Oct-2015 deraadt <deraadt@openbsd.org>

tame "stdio rpath" or tame "stdio" suffices for all of these programs.
fairly easy to audit by running nm and noticing nothing beyond base
stdio except for fopen/freopen. Then review all callpaths t

tame "stdio rpath" or tame "stdio" suffices for all of these programs.
fairly easy to audit by running nm and noticing nothing beyond base
stdio except for fopen/freopen. Then review all callpaths to those
functions, and place the tame() calls.
ok sthen

show more ...


# d927f21f 05-Sep-2015 jsg <jsg@openbsd.org>

Add brackets to clarify assignments that are the result of a test operator.

ok deraadt@ looks correct millert@ jung@


# 5302ee64 01-Dec-2014 deraadt <deraadt@openbsd.org>

trivial reallocarray() use


# 8929f197 15-Nov-2013 millert <millert@openbsd.org>

Include unistd.h as it is the standard location for getopt().


# f9bbbf45 04-Mar-2012 fgsch <fgsch@openbsd.org>

In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.


# 043fbe51 27-Oct-2009 deraadt <deraadt@openbsd.org>

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(th

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

show more ...


# 2e6633a8 27-Feb-2008 tobias <tobias@openbsd.org>

Properly check if temporary files have been successfully opened. If not,
print error message on stderr (instead of stdout).

ok millert, ray, tedu


# a52c79cd 10-Sep-2007 tobias <tobias@openbsd.org>

Proper use of fseek/fseeko macros.

OK joris@, otto@


# 6daeeae1 22-Nov-2005 markus <markus@openbsd.org>

out-of-bounds access; ok otto@, millert@, deraadt@


# 68496fbf 01-Aug-2005 otto <otto@openbsd.org>

Use dynamic memory instead of a fixed table. Makes merges files with
lots of changes possible. While there, kill an off-by-one.
Report and testing by Alexander Bluhm. ok millert@


# ad7191bd 30-Mar-2005 millert <millert@openbsd.org>

Use fgetln() to read lines so we are not limited to an arbitrarily small
line length. OK otto@


# 0b1c43df 07-Jan-2004 canacar <canacar@openbsd.org>

Correctly test for cases where one file is different, and the other has
no more changes.

ok millert@


# 8fa21293 09-Nov-2003 otto <otto@openbsd.org>

Typos in comments from Jared Yanovich <jjy2+ at pitt dot edu>


# ca9f5f35 24-Oct-2003 avsm <avsm@openbsd.org>

dont compare int to NULL, millert@ ok


# 91495ccd 14-Jul-2003 deraadt <deraadt@openbsd.org>

knf


# d407ca27 10-Jul-2003 millert <millert@openbsd.org>

A matching diff3 from 32V w/ some UCB changes. I cleaned this up a bit
(KNF and -Wall) and rewrote the shell front-end.