Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / external / redland / raptor / ubsan.patch
blob641d60bb7b49791b5b76b316e4812833cbf37354
1 --- src/raptor_rfc2396.c
2 +++ src/raptor_rfc2396.c
3 @@ -386,7 +386,7 @@
4 }
7 - if(prev && s == (cur+2) && cur[0] == '.' && cur[1] == '.') {
8 + if(prev && cur && s == (cur+2) && cur[0] == '.' && cur[1] == '.') {
9 /* Remove <component>/.. at the end of the path */
10 *prev = '\0';
11 path_len -= (s-prev);
12 --- src/raptor_uri.c
13 +++ src/raptor_uri.c
14 @@ -1336,9 +1336,9 @@
15 !strncmp((const char*)base_detail->scheme,
16 (const char*)reference_detail->scheme,
17 base_detail->scheme_len) &&
18 - !strncmp((const char*)base_detail->authority,
19 + (base_detail->authority_len == 0 || !strncmp((const char*)base_detail->authority,
20 (const char*)reference_detail->authority,
21 - base_detail->authority_len)) {
22 + base_detail->authority_len))) {
24 if(!base_detail->path) {
25 if(reference_detail->path) {