david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

14 Commits

Author SHA1 Message Date
Michael Brown a966570dce [libc] Avoid implicit assumptions about potentially-optimised memcpy()
Do not assume that an architecture-specific optimised memcpy() will
have the same properties as generic_memcpy() in terms of handling
overlapping regions.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-05-09 16:23:38 +01:00
Michael Brown b6ee89ffb5 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:17:31 +00:00
Michael Brown a32b1e9e35 [libc] Rewrite strtoul()
The implementation of strtoul() has a partially unknown provenance.
Rewrite this code to avoid potential licensing uncertainty.

Since we now use -ffunction-sections, there is no need to place
strtoull() in a separate file from strtoul().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-19 16:00:01 +00:00
Michael Brown 8ee39f7432 [libc] Rewrite string functions
Some of the C library string functions have an unknown provenance.
Reimplement all such functions to avoid potential licensing
uncertainty.

Remove the inline-assembler versions of strlen(), memswap(), and
strncmp(); these save a minimal amount of space (around 40 bytes in
total) and are not performance-critical.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-16 23:16:20 +00:00
Michael Brown 2b4be69eee [libc] Prevent strndup() from reading beyond the end of the string
strndup() may be called on a string which is not NUL-terminated.  Use
strnlen() instead of strlen() to ensure that we do not read beyond the
end of such a string.

Add self-tests for strndup(), including a test case with an
unterminated string.

Originally-fixed-by: Marin Hannache <git@mareo.fr>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-05-18 21:09:49 +01:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Holger Lubitz bb94c143d9 move strndup back to string.c - used by strdup 2007-08-02 01:48:20 +02:00
Holger Lubitz c9c97b3444 stripped down version of string.c containing only the used functions 2007-08-02 00:27:37 +02:00
Holger Lubitz f397fc443c make bcopy use memmove 2007-07-29 17:35:38 +02:00
Michael Brown e330db3c74 Dead code removal.
Kill off use of etherboot.h outside drivers/net.
2007-07-14 15:42:26 +01:00
Michael Brown 7137c20ed1 Add strcspn() and strndup() 2007-07-08 22:03:12 +01:00
Michael Brown afe4e011ac Move tolower() etc to ctype.h as per ISO C 2007-01-26 03:25:19 +00:00
Michael Brown 496563071d Added strdup() 2006-12-08 00:34:47 +00:00
Michael Brown 3d6123e69a Initial revision 2005-03-08 18:53:11 +00:00