Commit Graph

25 Commits

Author SHA1 Message Date
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 6490b8214b Don't taint out variable on error in psl_str_to_utf8lower()
Fixes #71
2016-12-05 16:28:47 +01:00
Tim Rühsen 1baaacccd5 Fix libidn/libidn2 code path of psl_str_to_utf8lower()
* fixing memory leaks
* proper handling of unterminated results of u8_tolower()
* second call to iconv() ensures flush of internal memory
* check more code paths of psl_str_to_utf8lower() via
  tests/test-registrable-domain.c
2016-09-23 12:35:08 +02:00
Tim Rühsen 4798ee88a2 Add test suite support for list/tests/tests.txt 2016-02-20 15:06:48 +01:00
Tim Rühsen 53c2fe31a8 Update copyright years 2015-09-23 14:50:01 +02:00
Tim Rühsen 7b72ac673b Skip leading whitespaces in tests_psl.txt 2015-08-14 12:27:11 +02:00
Daniel Kahn Gillmor c1b52ee2d8 Expect more from test_psl.txt
There were some tests included in test_psl.txt that we were not
covering because they didn't match our expectations.

Cover all the tests in test_psl that we know about, and count unknown
lines as failed tests.
2015-08-13 18:02:11 -04:00
Tim Rühsen 067f6aee9c Don't use locale dependent isspace()
Fixes an issue on Solaris
Reported-by: Dagobert Michelsen <dam@opencsw.org>
2015-01-26 11:05:32 +01:00
Tim Rühsen bbed26b303 check for alloca.h before including 2014-10-28 15:41:35 +01:00
Tim Ruehsen 1c20931896 introduced defines for error codes 2014-06-20 12:36:51 +02:00
Tim Ruehsen 28adbe1f1b removed IDNA case test if libicu is not configured 2014-06-18 15:20:48 +02:00
Tim Ruehsen 9aea73fb64 respect test data being always UTF-8 2014-06-18 12:41:23 +02:00
Tim Ruehsen 29d1300c86 free allocated variable 2014-06-18 12:25:06 +02:00
Tim Ruehsen 57394eb1f8 added psl_str_to_utf8lower() 2014-06-17 17:14:02 +02:00
Tim Ruehsen 657a1d4b88 use libicu for UTF-8 lowercase conversion 2014-06-16 21:59:23 +02:00
Tim Ruehsen 1efb6b75f4 changed code to C89 standard 2014-05-12 12:20:59 +02:00
Tim Ruehsen ed9562848c small --disable-builtin cleanups 2014-04-17 13:09:29 +02:00
Tim Ruehsen 5fa3b170bd added checks in test-registrable-domain.c 2014-04-16 10:53:59 +02:00
Tim Ruehsen c481e8019d added ./configure --with-psl-testfile to set PSL test file path 2014-04-13 16:43:03 +02:00
Tim Ruehsen 65a1f03939 small code fixes 2014-03-30 21:52:00 +02:00
Tim Ruehsen 31319a3dc7 added ./configure --disable-builtin to build without PSL data 2014-03-30 17:02:56 +02:00
Tim Ruehsen 535751b6cc prevailing rule is * 2014-03-28 22:02:42 +01:00
Tim Ruehsen 619959db7a added utf-8 to lowercase code using sed 2014-03-27 21:29:17 +01:00
Tim Ruehsen 87f269b6fb skip 'example' unregistered TLD tests, added some special tests 2014-03-27 12:32:35 +01:00
Tim Ruehsen fd0ff2023b added psl_registrable_domain(), renamed psl_registered_domain -> psl_unregistrable_domain 2014-03-26 22:27:31 +01:00