Dag-Erling Smørgrav
a8ee5392d8
New alpha release
2016-09-18 23:42:14 +02:00
Dag-Erling Smørgrav
92309ace42
Disable unused-result warnings.
...
It does not seem that gcc accepts casting to void as an alternative to actually checking the result. The only recourse we have is to disable the warning.
2016-09-18 23:32:53 +02:00
Dag-Erling Smørgrav
304fc8314d
Solve further asprintf() issues by sweeping them under the rug.
...
All further instances of asprintf() or vasprintf() in our codebase are either in libcryb-test or in individual unit tests, and in all cases, the only consequence of a failed call is that the result will say "no description" instead of either a description of the test or an explanation of how it failed. Therefore, we can simply ignore the problem and cast the call to void to satisfy gcc.
2016-09-18 22:40:48 +02:00
Dag-Erling Smørgrav
f7047a5370
Check the return value from asprintf().
...
This is actually redundant, because we already check the pointer, which is NULL if and only if asprintf() fails and returns < 0, but the version of gcc used by Travis CI insists. I have not been able to reproduce the issue on any other platform available to me.
2016-09-18 22:18:02 +02:00
Dag-Erling Smørgrav
ec3faa25e0
Correct YAML.
2016-09-18 21:37:52 +02:00
Dag-Erling Smørgrav
09ce719dd8
Clean up and re-add gcc.
2016-09-18 21:24:39 +02:00
Dag-Erling Smørgrav
d1b4e20404
Bump version.
2016-09-18 21:22:58 +02:00
Dag-Erling Smørgrav
048ea34cea
Don't call string_expand() unless we know that we need to.
2016-09-17 23:42:09 +02:00
Dag-Erling Smørgrav
1864453f4d
Add test cases for the new string functions.
2016-09-17 23:32:11 +02:00
Dag-Erling Smørgrav
c29ef6e2c5
Centralize most of .gitignore.
2016-09-17 21:38:54 +02:00
Dag-Erling Smørgrav
1dea8111a7
Add string_buf(), string_compare_cs(), string_equal_cs().
2016-09-17 21:37:18 +02:00
Dag-Erling Smørgrav
4241e6ce04
Add wide-character versions of strlcat(), strlcmp(), strlcpy().
2016-09-17 21:35:42 +02:00
Dag-Erling Smørgrav
c8be5ec837
Document all the hash and checksum functions.
2016-09-17 17:30:13 +02:00
Dag-Erling Smørgrav
859ef07fa0
The Adler-32 checksum is described in RFC 1950, not RFC 1905.
2016-09-17 17:22:38 +02:00
Dag-Erling Smørgrav
0471eb2d33
Clean up the cryb_strl*(3) man pages.
2016-09-17 16:50:37 +02:00
Dag-Erling Smørgrav
615c273ae2
Clean up the cryb_sha1(3) man page and add man pages for the SHA-2 functions.
2016-09-17 16:50:12 +02:00
Dag-Erling Smørgrav
36a0135a73
Add missing third clause to new files.
2016-09-17 16:22:19 +02:00
Dag-Erling Smørgrav
2d526210c3
Add tests for each library's cryb_foo_version() function.
...
This may seem stupid, but I've found bugs in the past which would have been caught by unit tests which I didn't write because they seemed stupid.
2016-09-17 16:14:00 +02:00
Dag-Erling Smørgrav
43587fe51a
Remove unneeded #includes.
2016-09-17 16:05:31 +02:00
Dag-Erling Smørgrav
b9cf4fb835
Implement the full range of BSD endianness conversion functions.
2016-09-15 11:18:01 +02:00
Dag-Erling Smørgrav
94a942caf0
Add support for __builtin_bswap16.
2016-09-15 11:09:34 +02:00
Dag-Erling Smørgrav
54cbd9c65b
Import AX_GCC_BUILTIN from the GNU Autoconf Archive.
2016-09-15 11:09:16 +02:00
Dag-Erling Smørgrav
fa68f15c34
Ensure that we always have off_t and ssize_t in scope.
...
POSIX requires <stdio.h> and <unistd.h> to define off_t and ssize_t like <sys/types.h> does, but not all platforms respect that. Play it safe by always including <sys/types.h>.
2016-09-15 10:15:00 +02:00
Dag-Erling Smørgrav
c55a3c4e09
Fix signed / unsigned mismatch.
2016-09-05 15:46:29 +02:00
Dag-Erling Smørgrav
f7a2f301ef
Rename a few more files.
2016-09-04 16:34:30 +02:00
Dag-Erling Smørgrav
8ceb5a646c
Only run Coverity Scan on the "scan" branch.
2016-09-04 16:32:17 +02:00
Dag-Erling Smørgrav
df0b4f11d6
Include <unistd.h> for ssize_t, which is used by the string library.
2016-09-04 16:20:24 +02:00
Dag-Erling Smørgrav
66715646d1
Respect user's CC
2016-09-04 16:18:13 +02:00
Dag-Erling Smørgrav
087aeca634
Bump version
2016-09-04 15:04:26 +02:00
Dag-Erling Smørgrav
68f20a9213
Big reorganization and cleanup
2016-09-04 14:56:39 +02:00
Dag-Erling Smørgrav
c030e63ef2
Bump version
2016-03-21 12:35:42 +01:00
Dag-Erling Smørgrav
401465d8ea
Move main() from libcryb-test to the test program.
...
Instead of having libcryb-test provide main() and assume that the test program defines t_prepare() and t_cleanup(), have libcryb-test provide a t_main() function which the test program calls with pointers to its prepare and cleanup functions.
2016-03-15 14:29:44 +01:00
Dag-Erling Smørgrav
c68fd1098d
We need <cryb/attributes.h> here for the CRYB_PRINTF() macro.
2016-03-15 14:28:47 +01:00
Dag-Erling Smørgrav
34fe861a36
<cryb/coverage.h> needs to be installed along with libcryb-test.
2016-03-15 14:27:02 +01:00
Dag-Erling Smørgrav
61a83a1fae
Cosmetic: use angle brackets instead of double quotes
2016-03-15 14:26:32 +01:00
Dag-Erling Smørgrav
4d1703c77a
Don't try to memset NULL if allocation fails.
...
Always emit UTRACE records, even for failed allocations.
When allocating more than was requested, fill the slop with garbage.
2016-02-19 12:23:17 +01:00
Dag-Erling Smørgrav
1d0f2a4ff3
Reserve room in the label buffer for the terminating NUL.
2016-02-19 12:20:25 +01:00
Dag-Erling Smørgrav
3fbaf4e647
Enable Coverity Scan addon.
2016-02-19 11:41:39 +01:00
Dag-Erling Smørgrav
0917eee32e
Move configure to before_script.
2016-02-19 11:15:13 +01:00
Dag-Erling Smørgrav
c044f2580b
Fix buffer over-read in percent_decode().
...
When decoding a trigram, percent_decode() would correctly increment the input pointer by an extra two characters (three total) but would not decrement the input length by the same amount. This would result in a buffer over-read when decoding unterminated strings.
2016-01-10 23:29:03 +01:00
Dag-Erling Smørgrav
476374323d
Vastly improve unit tests for percent-encoding API.
2016-01-10 23:28:04 +01:00
Dag-Erling Smørgrav
e40f2f7d4b
Improve and document percent-encoding API.
...
- Ensure that the output is always NUL-terminated.
- Always include the terminating NUL in the returned length.
- Allow out == NULL, allowing the caller to check how much space is required before allocating.
- Add man page.
2016-01-10 23:25:28 +01:00
Dag-Erling Smørgrav
6eaaac308f
Add a t_compare_strn() function which is to t_compare_str() what strncmp() is to
...
strcmp().
2016-01-10 18:49:19 +01:00
Dag-Erling Smørgrav
d2a98cd870
Generate .xz tarball by default, not .gz
2016-01-09 20:26:40 +01:00
Dag-Erling Smørgrav
e370978433
Run BullseyeCoverage tools quietly
2016-01-09 20:23:33 +01:00
Dag-Erling Smørgrav
9905f08c80
Change tarname to cryb-to to match github project name etc.
2016-01-09 20:16:04 +01:00
Dag-Erling Smørgrav
afe99d57dd
Bump internal version number.
2016-01-09 20:12:01 +01:00
Dag-Erling Smørgrav
2237a13d5b
Hide the no-op default case when not instrumenting for coverage analysis.
2016-01-09 18:37:36 +01:00
Dag-Erling Smørgrav
e5b9a12a35
Add -Wshadow.
2016-01-09 18:37:05 +01:00
Dag-Erling Smørgrav
da40b1fad8
Add man pages for a few functions.
2016-01-08 17:27:27 +01:00