Commit Graph

494 Commits

Author SHA1 Message Date
Tim Rühsen 3f511532de Make global vars static in test-is-public-all.c 2018-04-27 15:52:11 +02:00
Tim Rühsen dd44296e62 Remove leading _ from header guard 2018-04-27 15:52:11 +02:00
Tim Rühsen eba4c9f9a2 Remove unused vars in test-is-public-all.c 2018-04-27 15:52:10 +02:00
Tim Rühsen 5d27e573b8 Extend visibility support
Also renamed PSL_PUBLIC -> PSL_API (conforming to other known libraries).
2018-04-27 15:52:09 +02:00
Chun-wei Fan 11e2a32b4a libpsl.h.in: Decorate public symbols for export
Introduce a macro, PSL_PUBLIC, which is defined as nothing by default,
which can be used by the compiler to instruct the linker to export the
public symbols, such as __declspec (dllexport) on Visual Studio.
2018-04-27 15:52:08 +02:00
Chun-wei Fan 8767c48f43 src/psl.c: Make code compilable on native Windows
Include the Windows/Winsock2 counterparts of the networking headers on
Windows and avoid including *NIX-specific headers on Windows.

Also remove the small bits of C99isms from the code.
2018-04-27 15:52:07 +02:00
Emmanuele Bassi bbee21ff68 Fix non-srcdir builds
We need to modify the various paths we reference to include the build
directory, in the case when the build directory is not the source
directory.
2018-04-27 15:52:07 +02:00
Daniel Kahn Gillmor 8207e13cdc fix spelling errors 2018-04-27 15:52:06 +02:00
Tim Rühsen b9db5a7305 Fix make distcheck without enabled docs 2018-04-27 15:52:05 +02:00
Tim Rühsen 6aaf6f4620 Don't require xsltproc when not building man pages 2018-04-27 15:52:04 +02:00
Tim Rühsen 4e808b0496 Fix --disable-builtin configure option 2018-04-27 15:52:03 +02:00
Tim Rühsen bb53ff2d63 Release V0.20.1 2018-04-27 15:52:02 +02:00
Tim Rühsen adcf96fbbe Improve docs for PSL_TYPE_NO_STAR_RULE 2018-04-27 15:52:01 +02:00
Tim Rühsen 0410c72cd9 Add man page text about effect of --no-star-rule 2018-04-27 15:52:01 +02:00
Tim Rühsen 3b63c58722 Add --no-star-rule to psl utility 2018-04-27 15:52:00 +02:00
Tim Rühsen a19acd4299 Release v0.20.1 2018-04-27 15:51:59 +02:00
Tim Rühsen e901f5321f Fix PSL_TYPE_NO_STAR_RULE and improve test suite
Reported-by: Daniel Kahn Gillmor
2018-04-27 15:51:58 +02:00
Tim Rühsen dec2485114 Release v0.20.0 2018-04-27 15:51:57 +02:00
Tim Rühsen 3c28595151 Update copyrights 2018-04-27 15:51:57 +02:00
Tim Rühsen b42ca62b9c Update fuzzer to use PSL_TYPE_NO_STAR_RULE 2018-04-27 15:51:56 +02:00
Tim Rühsen 83fc0431e4 Update PSL submodule 2018-04-27 15:51:55 +02:00
Tim Rühsen c0cd25178b Add TLDs to (DAFSA) data to allow skipping the star rule 2018-04-27 15:51:54 +02:00
Claudio Saavedra db6f7b971c Add tests for PSL_TYPE_NO_STAR_RULE 2018-04-27 15:51:53 +02:00
Claudio Saavedra 737246856e psl_is_public_suffix2(): allow checking for suffixes not in the list
Add a PSL_TYPE_NO_STAR_RULE type to check for suffixes without the '*'
rule. This allows checking for suffixes that are not in the PSL.
2018-04-27 15:51:52 +02:00
Tim Rühsen 58ff15ca2c Remove C99 loop construct 2018-04-27 15:51:52 +02:00
Tim Rühsen 5c9e7e74ee Limit CPU wasting on large inputs
Large inputs on psl_registrable_domain() and psl_unregistrable_domain()
suffer from a O(N^2) behavior. This change limits N to avoid excessive
CPU usage.

At the same time we limit the fuzz corpora size to 64k which is far more
then we expect any real life domain to be.

Reported-by: OSS-Fuzz
2018-04-27 15:51:51 +02:00
Dagobert Michelsen 1f5db700ec Remove unconditional setting of GCC-specific flag 2018-04-27 15:51:50 +02:00
Tim Rühsen 5995c12be6 Update PSL submodule 2018-04-27 15:51:49 +02:00
Jeffrey Walton af2dbb83ec Expand defintion of PSL; add ICANN reference 2018-04-27 15:51:48 +02:00
Tim Rühsen 01a878ac88 Add missing include alloca.h in fuzz/main.c 2018-04-27 15:51:48 +02:00
Tim Rühsen fb29a889e4 Fix printf warnings in fuzz/main.c 2018-04-27 15:51:47 +02:00
Tim Rühsen 4fede219a1 Release v0.19.1 2018-04-27 15:51:46 +02:00
Tim Rühsen 8530d396c1 Fix unsigned integer overflow in _mem_is_ascii()
Found by OSS-Fuzz. It has no impact.
2018-04-27 15:51:45 +02:00
Tim Rühsen fa59acdeb8 Update corpora from oss-fuzz 2018-04-27 15:51:44 +02:00
Tim Rühsen a48169e6da psl_*_count() return -1 if information is not available 2018-04-27 15:51:43 +02:00
Tim Rühsen 4bfb18af61 Add psl_free_string to libpsl-sections.txt 2018-04-27 15:51:42 +02:00
Tim Rühsen 7785d6edb2 Amend start of comments in lookup_string_in_fixed_set.c 2018-04-27 15:51:41 +02:00
Tim Rühsen 4bcbb57936 Fix input encoding for python3 2018-04-27 15:51:41 +02:00
Darshit Shah 4d5982ed98 Add new function psl_free_string()
When writing a wrapper around LibPSL in a different language it is
important that libpsl provide functions to free any memory that it
allocates. Without this, it is impossible to correctly free the memory
allocated by psl_str_to_utf8lower() function since in other languages
one may not have access to the same free() call from libc.
2017-08-30 11:07:04 +02:00
Tim Rühsen d6c1051b37 Add m4/ax_check_compile_flag.m4 2017-07-27 11:55:29 +02:00
Tim Rühsen 0ff626f6b6 Update corpora from oss-fuzz 2017-07-27 11:36:18 +02:00
Tim Rühsen 4abb701b2c Improve fuzz/get_all_corpora 2017-07-27 11:29:29 +02:00
Tim Rühsen c1bf52dbc3 Add -fsanitize-address-use-after-scope to --enable-asan if available 2017-07-27 11:29:02 +02:00
Tim Rühsen c10ef083d6 Cleanup .travis_coveralls.sh 2017-07-27 11:07:00 +02:00
Tim Rühsen 05d957ffae Update .travis_coveralls.sh 2017-07-20 16:40:40 +02:00
Tim Rühsen 0d2649684f Release v0.18.0 2017-07-20 14:48:12 +02:00
Tim Rühsen 0e0ddc4cec Update contrib/check-hard 2017-07-20 14:46:55 +02:00
Tim Rühsen 659ee4391e Remove compiler warnings 2017-07-20 11:36:13 +02:00
Tim Rühsen 9ec54644d0 Update PSL submodule 2017-07-19 16:54:35 +02:00
Tim Rühsen 280c130f73 Add fuzz/git_all_corpora 2017-07-19 15:02:03 +02:00