summaryrefslogtreecommitdiffstats
path: root/src/tests/string_test.c
Commit message (Collapse)AuthorAgeFilesLines
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Rewrite strtoul()Michael Brown2015-02-191-0/+48
| | | | | | | | | | 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>
* [test] Add self-tests for more string functionsMichael Brown2015-02-171-0/+88
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Prevent strndup() from reading beyond the end of the stringMichael Brown2014-05-181-0/+20
| | | | | | | | | | | | 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>
* [test] Add self-tests for strdup()Michael Brown2014-05-181-0/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add self-tests for string functionsMichael Brown2012-11-121-0/+133
Signed-off-by: Michael Brown <mcb30@ipxe.org>