Commit Graph

18 Commits

Author SHA1 Message Date
Vincent Sanders
d2391b2dfd make the use of libutf8proc coditional
allow the browser to be compiled without libutf8proc. Without this
  library safe utf8 conversion and verification is not possible
  so the browser will loose the ability to navigate to adresses
  using the idna punycode scheme.
2019-10-03 00:28:08 +01:00
Vincent Sanders
8b6f590aaa prevent out of bounds access when checking IDNA host label 2019-06-13 17:02:08 +01:00
Vincent Sanders
865796486d make ssize_t type available on some platforms 2018-08-23 21:18:54 +01:00
Vincent Sanders
75018632a9 Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done

@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 18:45:27 +01:00
Vincent Sanders
6075feb487 create netsurf inttypes header to have portable integer formatting macros 2017-01-21 14:20:55 +00:00
Michael Drake
67b7854737 IDNA: Update to upstream-compatible utf8proc API. 2016-11-23 15:43:37 +00:00
Vincent Sanders
f33d9dcc8c cleanup unneeded includes in utils.h after API simplification 2016-04-20 23:56:29 +01:00
Vincent Sanders
d15ab96a51 Fix size_t printf formatting
The printf formatting for size_t is set in c99 as %zu but in windows
it is %Iu this is solved by adding and inttypes style PRI macro for size_t

This also uses this macro everywhere size_t is formatted.
2016-03-17 22:00:54 +00:00
Vincent Sanders
74fdde2b57 remove necessity for header change in libutf8proc
The combining character class definition was put in the libutf8proc
header instead of being local to the IDNA implementation.
2016-01-03 16:07:40 +00:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +01:00
Vincent Sanders
97759f62af USe the externally built conveniance utf8proc library 2014-11-14 13:46:08 +00:00
Vincent Sanders
9fde3502b6 doxygen cleanups in utils 2014-11-12 23:27:13 +00:00
Vincent Sanders
16dea2e2bd stop idna (en/de)code asploding when the passed host begins with a . 2014-06-10 23:38:35 +01:00
Chris Young
2462f5658e Fix memory leak on error 2014-06-10 19:27:39 +01:00
Vincent Sanders
d2b77a40a9 fix memory leaks in error paths. (coverity 1220852 and 1220851) 2014-06-10 00:22:44 +01:00
Daniel Silverstone
4641769ae5 Make chris' work compile without warning and not infinite-loop where I spotted it 2014-06-04 13:50:26 +01:00
Chris Young
eee7189f05 Normalise intermediary UCS-4 string when verifying ACE labels 2014-06-04 13:24:24 +01:00
Chris Young
db0856606a IDNA2008 support. 2014-06-04 13:24:24 +01:00