History log of /openbsd/usr.bin/diff/xmalloc.c (Results 1 – 10 of 10)
Revision Date Author Comments
# 7d5bbbe3 28-Jun-2019 deraadt <deraadt@openbsd.org>

asprintf returns -1, not an arbitrary value < 0. Also upon error the
(very sloppy specification) leaves an undefined value in *ret, so it is
wrong to inspect it, the error condition is enough.
discu

asprintf returns -1, not an arbitrary value < 0. Also upon error the
(very sloppy specification) leaves an undefined value in *ret, so it is
wrong to inspect it, the error condition is enough.
discussed a little with nicm, and then much more with millert until we
were exasperated

show more ...


# 6d42169e 17-Nov-2015 tobias <tobias@openbsd.org>

Merge xmalloc.[ch] files across base, skipping OpenSSH for now.

ok nicm


# a79a2617 25-Sep-2015 tedu <tedu@openbsd.org>

xmalloc/free wrappers don't need to support 20 year old non comformance


# 839dd609 17-Jun-2015 nicm <nicm@openbsd.org>

Use strdup in xstrdup; from Fritjof Bornebusch.


# 371275ca 29-Apr-2015 deraadt <deraadt@openbsd.org>

Change internal xrealloc() to a idiom-following xreallocarray().
This loses a "new size is 0" failure case. Probably not relevant;
and since we develop this in OpenBSD, we'll catch that before someo

Change internal xrealloc() to a idiom-following xreallocarray().
This loses a "new size is 0" failure case. Probably not relevant;
and since we develop this in OpenBSD, we'll catch that before someone
else imports this...
ok millert

show more ...


# 1357284a 05-Feb-2015 millert <millert@openbsd.org>

Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@


# 2506408a 19-Aug-2013 millert <millert@openbsd.org>

Fix bogus errx(2, NULL) usage; malloc() failure should use err(2, NULL).
For size and overflow errors, use the same error messages as ecalloc().
OK otto@


# 7b613089 04-Aug-2010 ray <ray@openbsd.org>

exit(2) on xcalloc failure. From Daniel Dickman <didickman () gmail
! com>, thanks!

OK deraadt


# 57003866 07-Jun-2009 ray <ray@openbsd.org>

More cvs/diff/rcs convergence:
1. Mostly variable/function renaming, SIZE_T_MAX->SIZE_MAX, and
spacing.
2. One strchr -> strncspn.
3. diff had a weird thing where it set file[12] = ofile[12] but
neve

More cvs/diff/rcs convergence:
1. Mostly variable/function renaming, SIZE_T_MAX->SIZE_MAX, and
spacing.
2. One strchr -> strncspn.
3. diff had a weird thing where it set file[12] = ofile[12] but
never updated file or ofile, then if file and ofile were different
it freed it. I removed it.

OK millert

show more ...


# 4a034c3a 29-May-2007 ray <ray@openbsd.org>

Bring in some changes from rcsdiff:
1. Replace all the e*alloc functions with the x*alloc versions.
2. Whitespace syncs according to style.
3. Remove the __inline stuff.
4. Remove the min/max functio

Bring in some changes from rcsdiff:
1. Replace all the e*alloc functions with the x*alloc versions.
2. Whitespace syncs according to style.
3. Remove the __inline stuff.
4. Remove the min/max functions, using the MAX/MIN macros instead.

OK millert@

show more ...