Ticket #68452: raptor2_err.log

File raptor2_err.log, 224.3 KB (added by cooljeanius (Eric Gallager), 3 weeks ago)

stderr output from building raptor2 with GCC's static analyzer enabled

Line 
1In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
2                 from curie.c:30:
3curie.c: In function 'raptor_librdfa_rdfa_resolve_curie':
4/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17: warning: use of possibly-NULL 'working_copy' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
5   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
6      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7curie.c:419:7: note: in expansion of macro 'memcpy'
8  419 |       memcpy(working_copy, uri, uri_len + 1);/*rdfa_replace_string(working_copy, uri);*/
9      |       ^~~~~~
10  'raptor_librdfa_rdfa_resolve_curie_list': event 1
11    |
12    |../src/raptor_internal.h:906:33:
13    |  906 | #define rdfa_resolve_curie_list raptor_librdfa_rdfa_resolve_curie_list
14    |      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15    |      |                                 |
16    |      |                                 (1) entry to 'raptor_librdfa_rdfa_resolve_curie_list'
17curie.c:649:11: note: in expansion of macro 'rdfa_resolve_curie_list'
18    |  649 | rdfalist* rdfa_resolve_curie_list(
19    |      |           ^~~~~~~~~~~~~~~~~~~~~~~
20    |
21  'raptor_librdfa_rdfa_resolve_curie_list': events 2-3
22    |
23    |  661 |    while(ctoken != NULL)
24    |  662 |    {
25    |  663 |       char* resolved_curie = NULL;
26    |      |             ~~~~~~~~~~~~~~
27    |      |             |
28    |      |             (3) ...to here
29    |
30  'raptor_librdfa_rdfa_resolve_curie_list': event 4
31    |
32    |../src/raptor_internal.h:905:28:
33    |  905 | #define rdfa_resolve_curie raptor_librdfa_rdfa_resolve_curie
34curie.c:670:13: note: in expansion of macro 'rdfa_resolve_curie'
35    |  670 |             rdfa_resolve_curie(rdfa_context, ctoken, mode);
36    |      |             ^~~~~~~~~~~~~~~~~~
37    |
38    +--> 'raptor_librdfa_rdfa_resolve_curie': event 5
39           |
40           |../src/raptor_internal.h:905:28:
41           |  905 | #define rdfa_resolve_curie raptor_librdfa_rdfa_resolve_curie
42           |      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43           |      |                            |
44           |      |                            (5) entry to 'raptor_librdfa_rdfa_resolve_curie'
45curie.c:348:7: note: in expansion of macro 'rdfa_resolve_curie'
46           |  348 | char* rdfa_resolve_curie(
47           |      |       ^~~~~~~~~~~~~~~~~~
48           |
49         'raptor_librdfa_rdfa_resolve_curie': event 6
50           |
51           |../src/raptor_internal.h:881:29:
52           |  881 | #define rdfa_get_curie_type raptor_librdfa_rdfa_get_curie_type
53curie.c:352:20: note: in expansion of macro 'rdfa_get_curie_type'
54           |  352 |    curie_t ctype = rdfa_get_curie_type(uri);
55           |      |                    ^~~~~~~~~~~~~~~~~~~
56           |
57           +--> 'raptor_librdfa_rdfa_get_curie_type': event 7
58                  |
59                  |../src/raptor_internal.h:881:29:
60                  |  881 | #define rdfa_get_curie_type raptor_librdfa_rdfa_get_curie_type
61                  |      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62                  |      |                             |
63                  |      |                             (7) entry to 'raptor_librdfa_rdfa_get_curie_type'
64curie.c:53:16: note: in expansion of macro 'rdfa_get_curie_type'
65                  |   53 | static curie_t rdfa_get_curie_type(const char* uri)
66                  |      |                ^~~~~~~~~~~~~~~~~~~
67                  |
68                'raptor_librdfa_rdfa_get_curie_type': events 8-9
69                  |
70                  |   57 |    if(uri != NULL)
71                  |      |      ^
72                  |      |      |
73                  |      |      (8) following 'true' branch (when 'uri' is non-NULL)...
74                  |   58 |    {
75                  |   59 |       size_t uri_length = strlen(uri);
76                  |      |                           ~~~~~~~~~~~
77                  |      |                           |
78                  |      |                           (9) ...to here
79                  |
80           <------+
81           |
82         'raptor_librdfa_rdfa_resolve_curie': event 10
83           |
84           |../src/raptor_internal.h:881:29:
85           |  881 | #define rdfa_get_curie_type raptor_librdfa_rdfa_get_curie_type
86curie.c:352:20: note: in expansion of macro 'rdfa_get_curie_type'
87           |  352 |    curie_t ctype = rdfa_get_curie_type(uri);
88           |      |                    ^~~~~~~~~~~~~~~~~~~
89           |
90         'raptor_librdfa_rdfa_resolve_curie': events 11-15
91           |
92           |  354 |    if(!uri)
93           |      |      ^
94           |      |      |
95           |      |      (11) following 'false' branch (when 'uri' is non-NULL)...
96           |......
97           |  357 |    if(ctype == CURIE_TYPE_INVALID)
98           |      |      ~
99           |      |      |
100           |      |      (12) ...to here
101           |......
102           |  404 |    if(rval == NULL && ((ctype == CURIE_TYPE_SAFE) ||
103           |      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104           |      |      |             |
105           |      |      |             (14) ...to here
106           |      |      (13) following 'true' branch (when 'rval' is NULL)...
107           |  405 |          ((ctype == CURIE_TYPE_IRI_OR_UNSAFE) &&
108           |      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109           |  406 |           ((mode == CURIE_PARSE_INSTANCEOF_DATATYPE) ||
110           |      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111           |  407 |            (mode == CURIE_PARSE_PROPERTY) ||
112           |      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113           |  408 |            (mode == CURIE_PARSE_RELREV) ||
114           |      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115           |  409 |            (context->rdfa_version == RDFA_VERSION_1_1 &&
116           |      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117           |  410 |               mode == CURIE_PARSE_ABOUT_RESOURCE)))))
118           |      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119           |......
120           |  418 |       working_copy = (char*)malloc(uri_len + 1);
121           |      |                             ~~~~~~~~~~~~~~~~~~~
122           |      |                             |
123           |      |                             (15) this call could return NULL
124           |
125         'raptor_librdfa_rdfa_resolve_curie': event 16
126           |
127           |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
128           |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
129           |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130           |      |                 |
131           |      |                 (16) argument 1 ('working_copy') from (15) could be NULL where non-null expected
132curie.c:419:7: note: in expansion of macro 'memcpy'
133           |  419 |       memcpy(working_copy, uri, uri_len + 1);/*rdfa_replace_string(working_copy, uri);*/
134           |      |       ^~~~~~
135           |
136<built-in>: note: argument 1 of '__builtin___memcpy_chk' must be non-null
137In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
138                 from iri.c:28:
139iri.c: In function 'raptor_librdfa_rdfa_iri_get_base':
140/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:128:17: warning: use of possibly-NULL 'rval' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
141  128 |                 __builtin___strncpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
142      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143iri.c:68:14: note: in expansion of macro 'strncpy'
144   68 |       rval = strncpy(rval, iri, length);
145      |              ^~~~~~~
146  'raptor_librdfa_rdfa_iri_get_base': events 1-6
147    |
148    |   47 |    eindex = strchr(iri, '?');
149    |      |             ^~~~~~~~~~~~~~~~
150    |      |             |
151    |      |             (1) when 'strchr' returns non-NULL
152    |   48 |    if(eindex == NULL)
153    |      |      ~       
154    |      |      |
155    |      |      (2) following 'false' branch (when 'eindex' is non-NULL)...
156    |......
157    |   57 |    if(eindex == NULL)
158    |      |      ~       
159    |      |      |
160    |      |      (3) ...to here
161    |      |      (4) following 'false' branch (when 'eindex' is non-NULL)...
162    |......
163    |   66 |       unsigned int length = (unsigned int)(eindex - iri);
164    |      |                                           ~~~~~~~~~~~~~~
165    |      |                                                   |
166    |      |                                                   (5) ...to here
167    |   67 |       rval = (char*)malloc(length + 1);
168    |      |                     ~~~~~~~~~~~~~~~~~~
169    |      |                     |
170    |      |                     (6) this call could return NULL
171    |
172  'raptor_librdfa_rdfa_iri_get_base': event 7
173    |
174    |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:128:17:
175    |  128 |                 __builtin___strncpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
176    |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177    |      |                 |
178    |      |                 (7) argument 1 ('rval') from (6) could be NULL where non-null expected
179iri.c:68:14: note: in expansion of macro 'strncpy'
180    |   68 |       rval = strncpy(rval, iri, length);
181    |      |              ^~~~~~~
182    |
183<built-in>: note: argument 1 of '__builtin___strncpy_chk' must be non-null
184In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
185                 from rdfa.c:45:
186rdfa.c: In function 'raptor_librdfa_rdfa_init_base':
187/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:128:17: warning: use of possibly-NULL 'temp_uri' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
188  128 |                 __builtin___strncpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
189      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
190rdfa.c:164:16: note: in expansion of macro 'strncpy'
191  164 |                strncpy(temp_uri, uri_start, uri_size);
192      |                ^~~~~~~
193  'raptor_librdfa_rdfa_parse_chunk': event 1
194    |
195    |../src/raptor_internal.h:893:26:
196    |  893 | #define rdfa_parse_chunk raptor_librdfa_rdfa_parse_chunk
197    |      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
198    |      |                          |
199    |      |                          (1) entry to 'raptor_librdfa_rdfa_parse_chunk'
200rdfa.c:1410:5: note: in expansion of macro 'rdfa_parse_chunk'
201    | 1410 | int rdfa_parse_chunk(rdfacontext* context, char* data, size_t wblen, int done)
202    |      |     ^~~~~~~~~~~~~~~~
203    |
204  'raptor_librdfa_rdfa_parse_chunk': events 2-4
205    |
206    | 1419 |    if(context->done)
207    |      |      ^
208    |      |      |
209    |      |      (2) following 'false' branch...
210    |......
211    | 1424 |    if(!context->preread)
212    |      |      ~ ~~~~~~~~~~~~~~~~
213    |      |      |        |
214    |      |      |        (3) ...to here
215    |      |      (4) following 'true' branch...
216    |
217  'raptor_librdfa_rdfa_parse_chunk': event 5
218    |
219    |../src/raptor_internal.h:884:24:
220    |  884 | #define rdfa_init_base raptor_librdfa_rdfa_init_base
221rdfa.c:1428:29: note: in expansion of macro 'rdfa_init_base'
222    | 1428 |       context->wb_preread = rdfa_init_base(context,
223    |      |                             ^~~~~~~~~~~~~~
224    |
225  'raptor_librdfa_rdfa_parse_chunk': event 6
226    |
227    |../src/raptor_internal.h:884:24:
228    |  884 | #define rdfa_init_base raptor_librdfa_rdfa_init_base
229rdfa.c:1428:29: note: in expansion of macro 'rdfa_init_base'
230    | 1428 |       context->wb_preread = rdfa_init_base(context,
231    |      |                             ^~~~~~~~~~~~~~
232    |
233    +--> 'raptor_librdfa_rdfa_init_base': event 7
234           |
235           |../src/raptor_internal.h:884:24:
236           |  884 | #define rdfa_init_base raptor_librdfa_rdfa_init_base
237           |      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238           |      |                        |
239           |      |                        (7) entry to 'raptor_librdfa_rdfa_init_base'
240rdfa.c:69:15: note: in expansion of macro 'rdfa_init_base'
241           |   69 | static size_t rdfa_init_base(
242           |      |               ^~~~~~~~~~~~~~
243           |
244         'raptor_librdfa_rdfa_init_base': events 8-25
245           |
246           |  102 |    if(strstr(*working_buffer, "-//W3C//DTD XHTML+RDFa 1.0//EN") != NULL)
247           |      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
248           |      |       |
249           |      |       (8) when 'strstr' returns non-NULL
250           |......
251           |  132 |    head_end = strstr(*working_buffer, "</head>");
252           |      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
253           |      |               |
254           |      |               (9) when 'strstr' returns non-NULL
255           |......
256           |  138 |    if(head_end == NULL)
257           |      |      ~
258           |      |      |
259           |      |      (10) following 'false' branch (when 'head_end' is non-NULL)...
260           |......
261           |  142 |    if(head_end != NULL)
262           |      |      ~
263           |      |      |
264           |      |      (11) ...to here
265           |      |      (12) following 'true' branch (when 'head_end' is non-NULL)...
266           |  143 |    {
267           |  144 |       char* base_start = strstr(*working_buffer, "<base ");
268           |      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
269           |      |                          |
270           |      |                          (13) ...to here
271           |      |                          (14) when 'strstr' returns non-NULL
272           |......
273           |  148 |       if(base_start != NULL)
274           |      |         ~
275           |      |         |
276           |      |         (15) following 'true' branch (when 'base_start' is non-NULL)...
277           |  149 |         href_start = strstr(base_start, "href=");
278           |      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
279           |      |                      |
280           |      |                      (16) ...to here
281           |      |                      (17) when 'strstr' returns non-NULL
282           |  150 |
283           |  151 |       if(href_start != NULL)
284           |      |         ~
285           |      |         |
286           |      |         (18) following 'true' branch (when 'href_start' is non-NULL)...
287           |  152 |       {
288           |  153 |          char sep = href_start[5];
289           |      |               ~~~
290           |      |               |
291           |      |               (19) ...to here
292           |  154 |          char* uri_start = href_start + 6;
293           |  155 |          char* uri_end = strchr(uri_start, sep);
294           |      |                          ~~~~~~~~~~~~~~~~~~~~~~
295           |      |                          |
296           |      |                          (20) when 'strchr' returns non-NULL
297           |  156 |
298           |  157 |          if(uri_end != NULL)
299           |      |            ~
300           |      |            |
301           |      |            (21) following 'true' branch (when 'uri_end' is non-NULL)...
302           |  158 |          {
303           |  159 |             if(*uri_start != sep)
304           |      |               ~~~~~~~~~~~
305           |      |               ||
306           |      |               |(22) ...to here
307           |      |               (23) following 'true' branch...
308           |  160 |             {
309           |  161 |                size_t uri_size = uri_end - uri_start;
310           |      |                                  ~~~~~~~~~~~~~~~~~~~
311           |      |                                          |
312           |      |                                          (24) ...to here
313           |  162 |                char* temp_uri = (char*)malloc(sizeof(char) * uri_size + 1);
314           |      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315           |      |                                        |
316           |      |                                        (25) this call could return NULL
317           |
318         'raptor_librdfa_rdfa_init_base': event 26
319           |
320           |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:128:17:
321           |  128 |                 __builtin___strncpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
322           |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
323           |      |                 |
324           |      |                 (26) argument 1 ('temp_uri') from (25) could be NULL where non-null expected
325rdfa.c:164:16: note: in expansion of macro 'strncpy'
326           |  164 |                strncpy(temp_uri, uri_start, uri_size);
327           |      |                ^~~~~~~
328           |
329<built-in>: note: argument 1 of '__builtin___strncpy_chk' must be non-null
330rdfa.c: In function 'character_data':
331/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:77:17: warning: use of possibly-NULL 'buffer' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
332   77 |                 __builtin___memset_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
333      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
334rdfa.c:980:4: note: in expansion of macro 'memset'
335  980 |    memset(buffer, 0, len + 1);
336      |    ^~~~~~
337  'character_data': event 1
338    |
339    |  979 |    char *buffer = (char*)malloc(len + 1);
340    |      |                          ^~~~~~~~~~~~~~~
341    |      |                          |
342    |      |                          (1) this call could return NULL
343    |
344  'character_data': event 2
345    |
346    |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:77:17:
347    |   77 |                 __builtin___memset_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
348    |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
349    |      |                 |
350    |      |                 (2) argument 1 ('buffer') from (1) could be NULL where non-null expected
351rdfa.c:980:4: note: in expansion of macro 'memset'
352    |  980 |    memset(buffer, 0, len + 1);
353    |      |    ^~~~~~
354    |
355<built-in>: note: argument 1 of '__builtin___memset_chk' must be non-null
356rdfa.c: In function 'end_element':
357rdfa.c:1037:14: warning: dereference of possibly-NULL 'buffer' [CWE-690] [-Wanalyzer-possible-null-dereference]
358 1037 |    buffer[0] = '<';
359      |    ~~~~~~~~~~^~~~~
360  'end_element': events 1-2
361    |
362    | 1028 |    char* buffer = (char*)malloc(name_len + 3 + 1);
363    |      |                          ^~~~~~~~~~~~~~~~~~~~~~~~
364    |      |                          |
365    |      |                          (1) this call could return NULL
366    |......
367    | 1037 |    buffer[0] = '<';
368    |      |    ~~~~~~~~~~~~~~~       
369    |      |              |
370    |      |              (2) 'buffer' could be NULL: unchecked value from (1)
371    |
372rdfa.c: In function 'raptor_rdfa_start_element':
373rdfa.c:1287:16: warning: dereference of possibly-NULL 'attri' [CWE-690] [-Wanalyzer-possible-null-dereference]
374 1287 |       attri[0] = (char*)attrs[i]->local_name;
375      |       ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
376  'raptor_rdfa_start_element': events 1-6
377    |
378    | 1277 |   if(nb_attributes > 0) {
379    |      |     ^
380    |      |     |
381    |      |     (1) following 'true' branch (when 'nb_attributes > 0')...
382    |......
383    | 1282 |     attr = (char**)malloc(sizeof(char*) * (1 + (nb_attributes * 5)));
384    |      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
385    |      |                    |                                          |
386    |      |                    (3) this call could return NULL            (2) ...to here
387    | 1283 |     for(i = 0; i < nb_attributes; i++) {
388    |      |                ~~~~~~~~~~~~~~~~~
389    |      |                  |
390    |      |                  (4) following 'true' branch (when 'i < nb_attributes')...
391    | 1284 |       const raptor_namespace* attr_ns = attrs[i]->nspace;
392    |      |                                              ~
393    |      |                                              |
394    |      |                                              (5) ...to here
395    |......
396    | 1287 |       attri[0] = (char*)attrs[i]->local_name;
397    |      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
398    |      |                |
399    |      |                (6) 'attri' could be NULL: unchecked value from (3)
400    |
401rdfa.c: In function 'raptor_librdfa_rdfa_parse_start':
402rdfa.c:1372:29: warning: dereference of possibly-NULL '*context.working_buffer' [CWE-690] [-Wanalyzer-possible-null-dereference]
403 1372 |    *context->working_buffer = '\0';
404      |    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
405  'raptor_librdfa_rdfa_parse_start': events 1-2
406    |
407    | 1371 |    context->working_buffer = (char*)malloc(context->wb_allocated + 1);
408    |      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
409    |      |                                     |
410    |      |                                     (1) this call could return NULL
411    | 1372 |    *context->working_buffer = '\0';
412    |      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
413    |      |                             |
414    |      |                             (2) '*context.working_buffer' could be NULL: unchecked value from (1)
415    |
416rdfa_utils.c: In function 'raptor_librdfa_rdfa_create_list':
417rdfa_utils.c:114:20: warning: dereference of possibly-NULL 'rval' [CWE-690] [-Wanalyzer-possible-null-dereference]
418  114 |    rval->max_items = size;
419      |    ~~~~~~~~~~~~~~~~^~~~~~
420  'raptor_librdfa_rdfa_create_list_mapping': event 1
421    |
422    |../src/raptor_internal.h:866:34:
423    |  866 | #define rdfa_create_list_mapping raptor_librdfa_rdfa_create_list_mapping
424    |      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
425    |      |                                  |
426    |      |                                  (1) entry to 'raptor_librdfa_rdfa_create_list_mapping'
427rdfa_utils.c:326:6: note: in expansion of macro 'rdfa_create_list_mapping'
428    |  326 | void rdfa_create_list_mapping(
429    |      |      ^~~~~~~~~~~~~~~~~~~~~~~~
430    |
431  'raptor_librdfa_rdfa_create_list_mapping': event 2
432    |
433    |../src/raptor_internal.h:882:31:
434    |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
435rdfa_utils.c:337:23: note: in expansion of macro 'rdfa_get_list_mapping'
436    |  337 |    value = (rdfalist*)rdfa_get_list_mapping(mapping, subject, key);
437    |      |                       ^~~~~~~~~~~~~~~~~~~~~
438    |
439    +--> 'raptor_librdfa_rdfa_get_list_mapping': event 3
440           |
441           |../src/raptor_internal.h:882:31:
442           |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
443           |      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444           |      |                               |
445           |      |                               (3) entry to 'raptor_librdfa_rdfa_get_list_mapping'
446rdfa_utils.c:450:13: note: in expansion of macro 'rdfa_get_list_mapping'
447           |  450 | const void* rdfa_get_list_mapping(
448           |      |             ^~~~~~~~~~~~~~~~~~~~~
449           |
450         'raptor_librdfa_rdfa_get_list_mapping': event 4
451           |
452           |  458 |    realkey = rdfa_strdup(subject);
453           |      |              ^~~~~~~~~~~~~~~~~~~~
454           |      |              |
455           |      |              (4) calling 'rdfa_strdup' from 'raptor_librdfa_rdfa_get_list_mapping'
456           |
457           +--> 'rdfa_strdup': events 5-7
458                  |
459                  |  530 | rdfa_strdup(const char* s)
460                  |      | ^~~~~~~~~~~
461                  |      | |
462                  |      | (5) entry to 'rdfa_strdup'
463                  |......
464                  |  535 |   if(!s)
465                  |      |     ~
466                  |      |     |
467                  |      |     (6) following 'false' branch (when 's' is non-NULL)...
468                  |......
469                  |  538 |   len = strlen(s) + 1;
470                  |      |         ~~~~~~~~~
471                  |      |         |
472                  |      |         (7) ...to here
473                  |
474           <------+
475           |
476         'raptor_librdfa_rdfa_get_list_mapping': event 8
477           |
478           |  458 |    realkey = rdfa_strdup(subject);
479           |      |              ^~~~~~~~~~~~~~~~~~~~
480           |      |              |
481           |      |              (8) returning to 'raptor_librdfa_rdfa_get_list_mapping' from 'rdfa_strdup'
482           |
483         'raptor_librdfa_rdfa_get_list_mapping': event 9
484           |
485           |../src/raptor_internal.h:888:30:
486           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
487rdfa_utils.c:459:14: note: in expansion of macro 'rdfa_n_append_string'
488           |  459 |    realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
489           |      |              ^~~~~~~~~~~~~~~~~~~~
490           |
491           +--> 'raptor_librdfa_rdfa_n_append_string': event 10
492                  |
493                  |../src/raptor_internal.h:888:30:
494                  |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
495                  |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
496                  |      |                              |
497                  |      |                              (10) entry to 'raptor_librdfa_rdfa_n_append_string'
498rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
499                  |   49 | char* rdfa_n_append_string(
500                  |      |       ^~~~~~~~~~~~~~~~~~~~
501                  |
502                'raptor_librdfa_rdfa_n_append_string': event 11
503                  |
504                  |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
505                  |      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
506                  |      |                  |
507                  |      |                  (11) when 'realloc' fails
508                  |
509           <------+
510           |
511         'raptor_librdfa_rdfa_get_list_mapping': event 12
512           |
513           |../src/raptor_internal.h:888:30:
514           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
515rdfa_utils.c:459:14: note: in expansion of macro 'rdfa_n_append_string'
516           |  459 |    realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
517           |      |              ^~~~~~~~~~~~~~~~~~~~
518           |
519         'raptor_librdfa_rdfa_get_list_mapping': event 13
520           |
521           |../src/raptor_internal.h:888:30:
522           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
523rdfa_utils.c:460:14: note: in expansion of macro 'rdfa_n_append_string'
524           |  460 |    realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
525           |      |              ^~~~~~~~~~~~~~~~~~~~
526           |
527           +--> 'raptor_librdfa_rdfa_n_append_string': event 14
528                  |
529                  |../src/raptor_internal.h:888:30:
530                  |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
531                  |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
532                  |      |                              |
533                  |      |                              (14) entry to 'raptor_librdfa_rdfa_n_append_string'
534rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
535                  |   49 | char* rdfa_n_append_string(
536                  |      |       ^~~~~~~~~~~~~~~~~~~~
537                  |
538                'raptor_librdfa_rdfa_n_append_string': event 15
539                  |
540                  |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
541                  |      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
542                  |      |                  |
543                  |      |                  (15) when 'realloc' fails
544                  |
545           <------+
546           |
547         'raptor_librdfa_rdfa_get_list_mapping': event 16
548           |
549           |../src/raptor_internal.h:888:30:
550           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
551rdfa_utils.c:460:14: note: in expansion of macro 'rdfa_n_append_string'
552           |  460 |    realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
553           |      |              ^~~~~~~~~~~~~~~~~~~~
554           |
555         'raptor_librdfa_rdfa_get_list_mapping': event 17
556           |
557           |../src/raptor_internal.h:883:26:
558           |  883 | #define rdfa_get_mapping raptor_librdfa_rdfa_get_mapping
559rdfa_utils.c:461:18: note: in expansion of macro 'rdfa_get_mapping'
560           |  461 |    rval = (void*)rdfa_get_mapping(mapping, realkey);
561           |      |                  ^~~~~~~~~~~~~~~~
562           |
563           +--> 'raptor_librdfa_rdfa_get_mapping': event 18
564                  |
565                  |../src/raptor_internal.h:883:26:
566                  |  883 | #define rdfa_get_mapping raptor_librdfa_rdfa_get_mapping
567                  |      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
568                  |      |                          |
569                  |      |                          (18) entry to 'raptor_librdfa_rdfa_get_mapping'
570rdfa_utils.c:427:13: note: in expansion of macro 'rdfa_get_mapping'
571                  |  427 | const void* rdfa_get_mapping(void** mapping, const char* key)
572                  |      |             ^~~~~~~~~~~~~~~~
573                  |
574                'raptor_librdfa_rdfa_get_mapping': events 19-20
575                  |
576                  |  433 |    while(*mptr != NULL)
577                  |......
578                  |  447 |    return rval;
579                  |      |           ~~~~ 
580                  |      |           |
581                  |      |           (20) ...to here
582                  |
583           <------+
584           |
585         'raptor_librdfa_rdfa_get_list_mapping': event 21
586           |
587           |../src/raptor_internal.h:883:26:
588           |  883 | #define rdfa_get_mapping raptor_librdfa_rdfa_get_mapping
589rdfa_utils.c:461:18: note: in expansion of macro 'rdfa_get_mapping'
590           |  461 |    rval = (void*)rdfa_get_mapping(mapping, realkey);
591           |      |                  ^~~~~~~~~~~~~~~~
592           |
593    <------+
594    |
595  'raptor_librdfa_rdfa_create_list_mapping': event 22
596    |
597    |../src/raptor_internal.h:882:31:
598    |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
599rdfa_utils.c:337:23: note: in expansion of macro 'rdfa_get_list_mapping'
600    |  337 |    value = (rdfalist*)rdfa_get_list_mapping(mapping, subject, key);
601    |      |                       ^~~~~~~~~~~~~~~~~~~~~
602    |
603  'raptor_librdfa_rdfa_create_list_mapping': event 23
604    |
605    |  339 |    if(value == NULL)
606    |      |      ^
607    |      |      |
608    |      |      (23) following 'true' branch (when 'value' is NULL)...
609    |
610  'raptor_librdfa_rdfa_create_list_mapping': event 24
611    |
612    |../src/raptor_internal.h:865:26:
613    |  865 | #define rdfa_create_list raptor_librdfa_rdfa_create_list
614rdfa_utils.c:342:15: note: in expansion of macro 'rdfa_create_list'
615    |  342 |       value = rdfa_create_list(MAX_LIST_ITEMS);
616    |      |               ^~~~~~~~~~~~~~~~
617    |
618  'raptor_librdfa_rdfa_create_list_mapping': event 25
619    |
620    |../src/raptor_internal.h:865:26:
621    |  865 | #define rdfa_create_list raptor_librdfa_rdfa_create_list
622rdfa_utils.c:342:15: note: in expansion of macro 'rdfa_create_list'
623    |  342 |       value = rdfa_create_list(MAX_LIST_ITEMS);
624    |      |               ^~~~~~~~~~~~~~~~
625    |
626    +--> 'raptor_librdfa_rdfa_create_list': event 26
627           |
628           |../src/raptor_internal.h:865:26:
629           |  865 | #define rdfa_create_list raptor_librdfa_rdfa_create_list
630           |      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
631           |      |                          |
632           |      |                          (26) entry to 'raptor_librdfa_rdfa_create_list'
633rdfa_utils.c:110:11: note: in expansion of macro 'rdfa_create_list'
634           |  110 | rdfalist* rdfa_create_list(size_t size)
635           |      |           ^~~~~~~~~~~~~~~~
636           |
637         'raptor_librdfa_rdfa_create_list': events 27-28
638           |
639           |  112 |    rdfalist* rval = (rdfalist*)malloc(sizeof(rdfalist));
640           |      |                                ^~~~~~~~~~~~~~~~~~~~~~~~
641           |      |                                |
642           |      |                                (27) this call could return NULL
643           |  113 |
644           |  114 |    rval->max_items = size;
645           |      |    ~~~~~~~~~~~~~~~~~~~~~~       
646           |      |                    |
647           |      |                    (28) 'rval' could be NULL: unchecked value from (27)
648           |
649rdfa_utils.c: In function 'raptor_librdfa_rdfa_copy_list':
650rdfa_utils.c:180:28: warning: dereference of possibly-NULL '*rval.items + (long unsigned int)i * 8' [CWE-690] [-Wanalyzer-possible-null-dereference]
651  180 |             rval->items[i] = NULL;
652  'raptor_librdfa_rdfa_create_list_mapping': event 1
653    |
654    |../src/raptor_internal.h:866:34:
655    |  866 | #define rdfa_create_list_mapping raptor_librdfa_rdfa_create_list_mapping
656    |      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
657    |      |                                  |
658    |      |                                  (1) entry to 'raptor_librdfa_rdfa_create_list_mapping'
659rdfa_utils.c:326:6: note: in expansion of macro 'rdfa_create_list_mapping'
660    |  326 | void rdfa_create_list_mapping(
661    |      |      ^~~~~~~~~~~~~~~~~~~~~~~~
662    |
663  'raptor_librdfa_rdfa_create_list_mapping': event 2
664    |
665    |../src/raptor_internal.h:882:31:
666    |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
667rdfa_utils.c:337:23: note: in expansion of macro 'rdfa_get_list_mapping'
668    |  337 |    value = (rdfalist*)rdfa_get_list_mapping(mapping, subject, key);
669    |      |                       ^~~~~~~~~~~~~~~~~~~~~
670    |
671    +--> 'raptor_librdfa_rdfa_get_list_mapping': event 3
672           |
673           |../src/raptor_internal.h:882:31:
674           |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
675           |      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
676           |      |                               |
677           |      |                               (3) entry to 'raptor_librdfa_rdfa_get_list_mapping'
678rdfa_utils.c:450:13: note: in expansion of macro 'rdfa_get_list_mapping'
679           |  450 | const void* rdfa_get_list_mapping(
680           |      |             ^~~~~~~~~~~~~~~~~~~~~
681           |
682         'raptor_librdfa_rdfa_get_list_mapping': event 4
683           |
684           |  458 |    realkey = rdfa_strdup(subject);
685           |      |              ^~~~~~~~~~~~~~~~~~~~
686           |      |              |
687           |      |              (4) calling 'rdfa_strdup' from 'raptor_librdfa_rdfa_get_list_mapping'
688           |
689           +--> 'rdfa_strdup': events 5-8
690                  |
691                  |  530 | rdfa_strdup(const char* s)
692                  |      | ^~~~~~~~~~~
693                  |      | |
694                  |      | (5) entry to 'rdfa_strdup'
695                  |......
696                  |  535 |   if(!s)
697                  |      |     ~
698                  |      |     |
699                  |      |     (6) following 'false' branch (when 's' is non-NULL)...
700                  |......
701                  |  538 |   len = strlen(s) + 1;
702                  |      |         ~~~~~~~~~
703                  |      |         |
704                  |      |         (7) ...to here
705                  |  539 |   buf = (char*)malloc(len);
706                  |  540 |   if(buf)
707                  |      |     ~
708                  |      |     |
709                  |      |     (8) following 'true' branch (when 'buf' is non-NULL)...
710                  |
711                'rdfa_strdup': event 9
712                  |
713                  |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
714                  |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
715                  |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
716                  |      |                 |
717                  |      |                 (9) ...to here
718rdfa_utils.c:541:5: note: in expansion of macro 'memcpy'
719                  |  541 |     memcpy(buf, s, len);
720                  |      |     ^~~~~~
721                  |
722           <------+
723           |
724         'raptor_librdfa_rdfa_get_list_mapping': event 10
725           |
726           |  458 |    realkey = rdfa_strdup(subject);
727           |      |              ^~~~~~~~~~~~~~~~~~~~
728           |      |              |
729           |      |              (10) returning to 'raptor_librdfa_rdfa_get_list_mapping' from 'rdfa_strdup'
730           |
731         'raptor_librdfa_rdfa_get_list_mapping': event 11
732           |
733           |../src/raptor_internal.h:888:30:
734           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
735rdfa_utils.c:459:14: note: in expansion of macro 'rdfa_n_append_string'
736           |  459 |    realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
737           |      |              ^~~~~~~~~~~~~~~~~~~~
738           |
739           +--> 'raptor_librdfa_rdfa_n_append_string': event 12
740                  |
741                  |../src/raptor_internal.h:888:30:
742                  |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
743                  |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
744                  |      |                              |
745                  |      |                              (12) entry to 'raptor_librdfa_rdfa_n_append_string'
746rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
747                  |   49 | char* rdfa_n_append_string(
748                  |      |       ^~~~~~~~~~~~~~~~~~~~
749                  |
750                'raptor_librdfa_rdfa_n_append_string': event 13
751                  |
752                  |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
753                  |      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
754                  |      |                  |
755                  |      |                  (13) when 'realloc' succeeds, without moving buffer
756                  |
757           <------+
758           |
759         'raptor_librdfa_rdfa_get_list_mapping': event 14
760           |
761           |../src/raptor_internal.h:888:30:
762           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
763rdfa_utils.c:459:14: note: in expansion of macro 'rdfa_n_append_string'
764           |  459 |    realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
765           |      |              ^~~~~~~~~~~~~~~~~~~~
766           |
767         'raptor_librdfa_rdfa_get_list_mapping': event 15
768           |
769           |../src/raptor_internal.h:888:30:
770           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
771rdfa_utils.c:460:14: note: in expansion of macro 'rdfa_n_append_string'
772           |  460 |    realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
773           |      |              ^~~~~~~~~~~~~~~~~~~~
774           |
775           +--> 'raptor_librdfa_rdfa_n_append_string': event 16
776                  |
777                  |../src/raptor_internal.h:888:30:
778                  |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
779                  |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
780                  |      |                              |
781                  |      |                              (16) entry to 'raptor_librdfa_rdfa_n_append_string'
782rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
783                  |   49 | char* rdfa_n_append_string(
784                  |      |       ^~~~~~~~~~~~~~~~~~~~
785                  |
786                'raptor_librdfa_rdfa_n_append_string': event 17
787                  |
788                  |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
789                  |      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
790                  |      |                  |
791                  |      |                  (17) when 'realloc' succeeds, without moving buffer
792                  |
793           <------+
794           |
795         'raptor_librdfa_rdfa_get_list_mapping': event 18
796           |
797           |../src/raptor_internal.h:888:30:
798           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
799rdfa_utils.c:460:14: note: in expansion of macro 'rdfa_n_append_string'
800           |  460 |    realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
801           |      |              ^~~~~~~~~~~~~~~~~~~~
802           |
803    <------+
804    |
805  'raptor_librdfa_rdfa_create_list_mapping': event 19
806    |
807    |../src/raptor_internal.h:882:31:
808    |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
809rdfa_utils.c:337:23: note: in expansion of macro 'rdfa_get_list_mapping'
810    |  337 |    value = (rdfalist*)rdfa_get_list_mapping(mapping, subject, key);
811    |      |                       ^~~~~~~~~~~~~~~~~~~~~
812    |
813  'raptor_librdfa_rdfa_create_list_mapping': event 20
814    |
815    |  339 |    if(value == NULL)
816    |      |      ^
817    |      |      |
818    |      |      (20) following 'true' branch (when 'value' is NULL)...
819    |
820  'raptor_librdfa_rdfa_create_list_mapping': event 21
821    |
822    |../src/raptor_internal.h:865:26:
823    |  865 | #define rdfa_create_list raptor_librdfa_rdfa_create_list
824rdfa_utils.c:342:15: note: in expansion of macro 'rdfa_create_list'
825    |  342 |       value = rdfa_create_list(MAX_LIST_ITEMS);
826    |      |               ^~~~~~~~~~~~~~~~
827    |
828  'raptor_librdfa_rdfa_create_list_mapping': event 22
829    |
830    |  347 |       realkey = rdfa_strdup(subject);
831    |      |                 ^~~~~~~~~~~~~~~~~~~~
832    |      |                 |
833    |      |                 (22) calling 'rdfa_strdup' from 'raptor_librdfa_rdfa_create_list_mapping'
834    |
835    +--> 'rdfa_strdup': events 23-26
836           |
837           |  530 | rdfa_strdup(const char* s)
838           |      | ^~~~~~~~~~~
839           |      | |
840           |      | (23) entry to 'rdfa_strdup'
841           |......
842           |  535 |   if(!s)
843           |      |     ~
844           |      |     |
845           |      |     (24) following 'false' branch (when 's' is non-NULL)...
846           |......
847           |  538 |   len = strlen(s) + 1;
848           |      |         ~~~~~~~~~
849           |      |         |
850           |      |         (25) ...to here
851           |  539 |   buf = (char*)malloc(len);
852           |  540 |   if(buf)
853           |      |     ~
854           |      |     |
855           |      |     (26) following 'true' branch (when 'buf' is non-NULL)...
856           |
857         'rdfa_strdup': event 27
858           |
859           |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
860           |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
861           |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
862           |      |                 |
863           |      |                 (27) ...to here
864rdfa_utils.c:541:5: note: in expansion of macro 'memcpy'
865           |  541 |     memcpy(buf, s, len);
866           |      |     ^~~~~~
867           |
868    <------+
869    |
870  'raptor_librdfa_rdfa_create_list_mapping': event 28
871    |
872    |  347 |       realkey = rdfa_strdup(subject);
873    |      |                 ^~~~~~~~~~~~~~~~~~~~
874    |      |                 |
875    |      |                 (28) returning to 'raptor_librdfa_rdfa_create_list_mapping' from 'rdfa_strdup'
876    |
877  'raptor_librdfa_rdfa_create_list_mapping': event 29
878    |
879    |../src/raptor_internal.h:888:30:
880    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
881rdfa_utils.c:348:17: note: in expansion of macro 'rdfa_n_append_string'
882    |  348 |       realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
883    |      |                 ^~~~~~~~~~~~~~~~~~~~
884    |
885    +--> 'raptor_librdfa_rdfa_n_append_string': event 30
886           |
887           |../src/raptor_internal.h:888:30:
888           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
889           |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
890           |      |                              |
891           |      |                              (30) entry to 'raptor_librdfa_rdfa_n_append_string'
892rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
893           |   49 | char* rdfa_n_append_string(
894           |      |       ^~~~~~~~~~~~~~~~~~~~
895           |
896         'raptor_librdfa_rdfa_n_append_string': event 31
897           |
898           |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
899           |      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
900           |      |                  |
901           |      |                  (31) when 'realloc' succeeds, without moving buffer
902           |
903    <------+
904    |
905  'raptor_librdfa_rdfa_create_list_mapping': event 32
906    |
907    |../src/raptor_internal.h:888:30:
908    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
909rdfa_utils.c:348:17: note: in expansion of macro 'rdfa_n_append_string'
910    |  348 |       realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
911    |      |                 ^~~~~~~~~~~~~~~~~~~~
912    |
913  'raptor_librdfa_rdfa_create_list_mapping': event 33
914    |
915    |../src/raptor_internal.h:888:30:
916    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
917rdfa_utils.c:349:17: note: in expansion of macro 'rdfa_n_append_string'
918    |  349 |       realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
919    |      |                 ^~~~~~~~~~~~~~~~~~~~
920    |
921    +--> 'raptor_librdfa_rdfa_n_append_string': event 34
922           |
923           |../src/raptor_internal.h:888:30:
924           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
925           |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
926           |      |                              |
927           |      |                              (34) entry to 'raptor_librdfa_rdfa_n_append_string'
928rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
929           |   49 | char* rdfa_n_append_string(
930           |      |       ^~~~~~~~~~~~~~~~~~~~
931           |
932         'raptor_librdfa_rdfa_n_append_string': event 35
933           |
934           |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
935           |      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
936           |      |                  |
937           |      |                  (35) when 'realloc' succeeds, without moving buffer
938           |
939    <------+
940    |
941  'raptor_librdfa_rdfa_create_list_mapping': event 36
942    |
943    |../src/raptor_internal.h:888:30:
944    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
945rdfa_utils.c:349:17: note: in expansion of macro 'rdfa_n_append_string'
946    |  349 |       realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
947    |      |                 ^~~~~~~~~~~~~~~~~~~~
948    |
949  'raptor_librdfa_rdfa_create_list_mapping': event 37
950    |
951    |../src/raptor_internal.h:916:29:
952    |  916 | #define rdfa_update_mapping raptor_librdfa_rdfa_update_mapping
953rdfa_utils.c:350:7: note: in expansion of macro 'rdfa_update_mapping'
954    |  350 |       rdfa_update_mapping(mapping, realkey, value,
955    |      |       ^~~~~~~~~~~~~~~~~~~
956    |
957    +--> 'raptor_librdfa_rdfa_update_mapping': event 38
958           |
959           |../src/raptor_internal.h:916:29:
960           |  916 | #define rdfa_update_mapping raptor_librdfa_rdfa_update_mapping
961           |      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
962           |      |                             |
963           |      |                             (38) entry to 'raptor_librdfa_rdfa_update_mapping'
964rdfa_utils.c:395:6: note: in expansion of macro 'rdfa_update_mapping'
965           |  395 | void rdfa_update_mapping(void** mapping, const char* key, const void* value,
966           |      |      ^~~~~~~~~~~~~~~~~~~
967           |
968         'raptor_librdfa_rdfa_update_mapping': events 39-43
969           |
970           |  402 |    while(!found && (*mptr != NULL))
971           |      |          ~~~~~~~^~~~~~~~~~~~~~~~~~
972           |      |                 |
973           |      |                 (39) following 'true' branch...
974           |  403 |    {
975           |  404 |       if(strcmp((char*)*mptr, key) == 0)
976           |      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~
977           |      |         ||
978           |      |         |(40) ...to here
979           |      |         (41) following 'true' branch (when the strings are equal)...
980           |  405 |       {
981           |  406 |          mptr++;
982           |      |          ~~~~~~ 
983           |      |              |
984           |      |              (42) ...to here
985           |  407 |          *mptr = update_mapping_value(*mptr, value);
986           |      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
987           |      |                  |
988           |      |                  (43) calling 'raptor_librdfa_rdfa_replace_list' from 'raptor_librdfa_rdfa_update_mapping'
989           |
990           +--> 'raptor_librdfa_rdfa_replace_list': event 44
991                  |
992                  |../src/raptor_internal.h:903:27:
993                  |  903 | #define rdfa_replace_list raptor_librdfa_rdfa_replace_list
994                  |      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
995                  |      |                           |
996                  |      |                           (44) entry to 'raptor_librdfa_rdfa_replace_list'
997rdfa_utils.c:122:11: note: in expansion of macro 'rdfa_replace_list'
998                  |  122 | rdfalist* rdfa_replace_list(rdfalist* old_list, rdfalist* new_list)
999                  |      |           ^~~~~~~~~~~~~~~~~
1000                  |
1001                'raptor_librdfa_rdfa_replace_list': event 45
1002                  |
1003                  |  126 |    if(new_list != NULL)
1004                  |      |      ^
1005                  |      |      |
1006                  |      |      (45) following 'true' branch (when 'new_list' is non-NULL)...
1007                  |
1008                'raptor_librdfa_rdfa_replace_list': event 46
1009                  |
1010                  |../src/raptor_internal.h:877:24:
1011                  |  877 | #define rdfa_free_list raptor_librdfa_rdfa_free_list
1012rdfa_utils.c:129:7: note: in expansion of macro 'rdfa_free_list'
1013                  |  129 |       rdfa_free_list(old_list);
1014                  |      |       ^~~~~~~~~~~~~~
1015                  |
1016                'raptor_librdfa_rdfa_replace_list': event 47
1017                  |
1018                  |../src/raptor_internal.h:877:24:
1019                  |  877 | #define rdfa_free_list raptor_librdfa_rdfa_free_list
1020rdfa_utils.c:129:7: note: in expansion of macro 'rdfa_free_list'
1021                  |  129 |       rdfa_free_list(old_list);
1022                  |      |       ^~~~~~~~~~~~~~
1023                  |
1024                  +--> 'raptor_librdfa_rdfa_free_list': event 48
1025                         |
1026                         |../src/raptor_internal.h:877:24:
1027                         |  877 | #define rdfa_free_list raptor_librdfa_rdfa_free_list
1028                         |      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1029                         |      |                        |
1030                         |      |                        (48) entry to 'raptor_librdfa_rdfa_free_list'
1031rdfa_utils.c:233:6: note: in expansion of macro 'rdfa_free_list'
1032                         |  233 | void rdfa_free_list(rdfalist* list)
1033                         |      |      ^~~~~~~~~~~~~~
1034                         |
1035                       'raptor_librdfa_rdfa_free_list': events 49-50
1036                         |
1037                         |  235 |    if(list != NULL)
1038                         |      |      ^
1039                         |      |      |
1040                         |      |      (49) following 'false' branch (when 'list' is NULL)...
1041                         |......
1042                         |  256 | }
1043                         |      | ~     
1044                         |      | |
1045                         |      | (50) ...to here
1046                         |
1047                  <------+
1048                  |
1049                'raptor_librdfa_rdfa_replace_list': event 51
1050                  |
1051                  |../src/raptor_internal.h:877:24:
1052                  |  877 | #define rdfa_free_list raptor_librdfa_rdfa_free_list
1053rdfa_utils.c:129:7: note: in expansion of macro 'rdfa_free_list'
1054                  |  129 |       rdfa_free_list(old_list);
1055                  |      |       ^~~~~~~~~~~~~~
1056                  |
1057                'raptor_librdfa_rdfa_replace_list': event 52
1058                  |
1059                  |../src/raptor_internal.h:861:24:
1060                  |  861 | #define rdfa_copy_list raptor_librdfa_rdfa_copy_list
1061rdfa_utils.c:132:14: note: in expansion of macro 'rdfa_copy_list'
1062                  |  132 |       rval = rdfa_copy_list(new_list);
1063                  |      |              ^~~~~~~~~~~~~~
1064                  |
1065                  +--> 'raptor_librdfa_rdfa_copy_list': event 53
1066                         |
1067                         |../src/raptor_internal.h:861:24:
1068                         |  861 | #define rdfa_copy_list raptor_librdfa_rdfa_copy_list
1069                         |      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1070                         |      |                        |
1071                         |      |                        (53) entry to 'raptor_librdfa_rdfa_copy_list'
1072rdfa_utils.c:138:11: note: in expansion of macro 'rdfa_copy_list'
1073                         |  138 | rdfalist* rdfa_copy_list(rdfalist* list)
1074                         |      |           ^~~~~~~~~~~~~~
1075                         |
1076                       'raptor_librdfa_rdfa_copy_list': event 54
1077                         |
1078                         |  142 |    if(list != NULL)
1079                         |      |      ^
1080                         |      |      |
1081                         |      |      (54) following 'true' branch (when 'list' is non-NULL)...
1082                         |
1083                       'raptor_librdfa_rdfa_copy_list': event 55
1084                         |
1085                         |../src/raptor_internal.h:865:26:
1086                         |  865 | #define rdfa_create_list raptor_librdfa_rdfa_create_list
1087rdfa_utils.c:145:14: note: in expansion of macro 'rdfa_create_list'
1088                         |  145 |       rval = rdfa_create_list(list->max_items);
1089                         |      |              ^~~~~~~~~~~~~~~~
1090                         |
1091                       'raptor_librdfa_rdfa_copy_list': event 56
1092                         |
1093                         |../src/raptor_internal.h:865:26:
1094                         |  865 | #define rdfa_create_list raptor_librdfa_rdfa_create_list
1095rdfa_utils.c:145:14: note: in expansion of macro 'rdfa_create_list'
1096                         |  145 |       rval = rdfa_create_list(list->max_items);
1097                         |      |              ^~~~~~~~~~~~~~~~
1098                         |
1099                         +--> 'raptor_librdfa_rdfa_create_list': event 57
1100                                |
1101                                |../src/raptor_internal.h:865:26:
1102                                |  865 | #define rdfa_create_list raptor_librdfa_rdfa_create_list
1103                                |      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1104                                |      |                          |
1105                                |      |                          (57) entry to 'raptor_librdfa_rdfa_create_list'
1106rdfa_utils.c:110:11: note: in expansion of macro 'rdfa_create_list'
1107                                |  110 | rdfalist* rdfa_create_list(size_t size)
1108                                |      |           ^~~~~~~~~~~~~~~~
1109                                |
1110                              'raptor_librdfa_rdfa_create_list': event 58
1111                                |
1112                                |  116 |    rval->items = (rdfalistitem**)malloc(
1113                                |      |                                  ^~~~~~~
1114                                |      |                                  |
1115                                |      |                                  (58) this call could return NULL
1116                                |  117 |       sizeof(rdfalistitem*) * rval->max_items);
1117                                |      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1118                                |
1119                         <------+
1120                         |
1121                       'raptor_librdfa_rdfa_copy_list': event 59
1122                         |
1123                         |../src/raptor_internal.h:865:26:
1124                         |  865 | #define rdfa_create_list raptor_librdfa_rdfa_create_list
1125rdfa_utils.c:145:14: note: in expansion of macro 'rdfa_create_list'
1126                         |  145 |       rval = rdfa_create_list(list->max_items);
1127                         |      |              ^~~~~~~~~~~~~~~~
1128                         |
1129                       'raptor_librdfa_rdfa_copy_list': events 60-63
1130                         |
1131                         |  153 |       for(i = 0; i < list->max_items; i++)
1132                         |      |                  ~~^~~~~~~~~~~~~~~~~
1133                         |      |                    |
1134                         |      |                    (60) following 'true' branch...
1135                         |  154 |       {
1136                         |  155 |          if(i < list->num_items)
1137                         |      |            ~~~~~~~~~~~~~~~~~~~~
1138                         |      |            |  |
1139                         |      |            |  (61) ...to here
1140                         |      |            (62) following 'false' branch...
1141                         |......
1142                         |  180 |             rval->items[i] = NULL;
1143                         |      |             ~~~~~~~~~~~
1144                         |      |                 |
1145                         |      |                 (63) ...to here
1146                         |
1147                       'raptor_librdfa_rdfa_copy_list': event 64
1148                         |
1149                         |  180 |             rval->items[i] = NULL;
1150                         |
1151rdfa_utils.c: In function 'raptor_librdfa_rdfa_add_item':
1152rdfa_utils.c:287:15: warning: dereference of possibly-NULL 'item' [CWE-690] [-Wanalyzer-possible-null-dereference]
1153  287 |    item->data = NULL;
1154  'raptor_librdfa_rdfa_add_item': events 1-3
1155    |
1156    |  282 |    if(!list)
1157    |      |      ^
1158    |      |      |
1159    |      |      (1) following 'false' branch (when 'list' is non-NULL)...
1160    |......
1161    |  285 |    item = (rdfalistitem*)malloc(sizeof(rdfalistitem));
1162    |      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1163    |      |                          |
1164    |      |                          (2) ...to here
1165    |      |                          (3) this call could return NULL
1166    |
1167  'raptor_librdfa_rdfa_add_item': event 4
1168    |
1169    |  287 |    item->data = NULL;
1170    |
1171In file included from rdfa.h:88,
1172                 from rdfa_utils.h:27,
1173                 from rdfa_utils.c:30:
1174rdfa_utils.c: In function 'raptor_librdfa_rdfa_copy_mapping':
1175../src/raptor_internal.h:904:29: warning: dereference of possibly-NULL 'rptr' [CWE-690] [-Wanalyzer-possible-null-dereference]
1176  904 | #define rdfa_replace_string raptor_librdfa_rdfa_replace_string
1177rdfa_utils.c:382:15: note: in expansion of macro 'rdfa_replace_string'
1178  382 |       *rptr = rdfa_replace_string((char*)*rptr, (const char*)*mptr);
1179      |               ^~~~~~~~~~~~~~~~~~~
1180  'raptor_librdfa_rdfa_copy_mapping': event 1
1181    |
1182    |  374 |    void** rval = (void**)calloc(MAX_URI_MAPPINGS * 2, sizeof(void*));
1183    |      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1184    |      |                          |
1185    |      |                          (1) this call could return NULL
1186    |
1187  'raptor_librdfa_rdfa_copy_mapping': event 2
1188    |
1189    |  379 |    while(*mptr != NULL)
1190    |
1191  'raptor_librdfa_rdfa_copy_mapping': event 3
1192    |
1193    |../src/raptor_internal.h:904:29:
1194    |  904 | #define rdfa_replace_string raptor_librdfa_rdfa_replace_string
1195rdfa_utils.c:382:15: note: in expansion of macro 'rdfa_replace_string'
1196    |  382 |       *rptr = rdfa_replace_string((char*)*rptr, (const char*)*mptr);
1197    |      |               ^~~~~~~~~~~~~~~~~~~
1198    |
1199  'raptor_librdfa_rdfa_copy_mapping': event 4
1200    |
1201    |../src/raptor_internal.h:904:29:
1202    |  904 | #define rdfa_replace_string raptor_librdfa_rdfa_replace_string
1203rdfa_utils.c:382:15: note: in expansion of macro 'rdfa_replace_string'
1204    |  382 |       *rptr = rdfa_replace_string((char*)*rptr, (const char*)*mptr);
1205    |      |               ^~~~~~~~~~~~~~~~~~~
1206    |
1207rdfa_utils.c: In function 'raptor_librdfa_rdfa_update_mapping':
1208rdfa_utils.c:404:10: warning: use of NULL 'key' where non-null expected [CWE-476] [-Wanalyzer-null-argument]
1209  404 |       if(strcmp((char*)*mptr, key) == 0)
1210      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
1211  'raptor_librdfa_rdfa_create_list_mapping': event 1
1212    |
1213    |../src/raptor_internal.h:866:34:
1214    |  866 | #define rdfa_create_list_mapping raptor_librdfa_rdfa_create_list_mapping
1215    |      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1216    |      |                                  |
1217    |      |                                  (1) entry to 'raptor_librdfa_rdfa_create_list_mapping'
1218rdfa_utils.c:326:6: note: in expansion of macro 'rdfa_create_list_mapping'
1219    |  326 | void rdfa_create_list_mapping(
1220    |      |      ^~~~~~~~~~~~~~~~~~~~~~~~
1221    |
1222  'raptor_librdfa_rdfa_create_list_mapping': event 2
1223    |
1224    |  330 |    char* realkey = NULL;
1225    |      |          ^~~~~~~
1226    |      |          |
1227    |      |          (2) 'realkey' is NULL
1228    |
1229  'raptor_librdfa_rdfa_create_list_mapping': event 3
1230    |
1231    |../src/raptor_internal.h:882:31:
1232    |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
1233rdfa_utils.c:337:23: note: in expansion of macro 'rdfa_get_list_mapping'
1234    |  337 |    value = (rdfalist*)rdfa_get_list_mapping(mapping, subject, key);
1235    |      |                       ^~~~~~~~~~~~~~~~~~~~~
1236    |
1237    +--> 'raptor_librdfa_rdfa_get_list_mapping': event 4
1238           |
1239           |../src/raptor_internal.h:882:31:
1240           |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
1241           |      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242           |      |                               |
1243           |      |                               (4) entry to 'raptor_librdfa_rdfa_get_list_mapping'
1244rdfa_utils.c:450:13: note: in expansion of macro 'rdfa_get_list_mapping'
1245           |  450 | const void* rdfa_get_list_mapping(
1246           |      |             ^~~~~~~~~~~~~~~~~~~~~
1247           |
1248         'raptor_librdfa_rdfa_get_list_mapping': events 5-6
1249           |
1250           |  454 |    char* realkey = NULL;
1251           |      |          ^~~~~~~
1252           |      |          |
1253           |      |          (5) 'realkey' is NULL
1254           |......
1255           |  458 |    realkey = rdfa_strdup(subject);
1256           |      |              ~~~~~~~~~~~~~~~~~~~~
1257           |      |              |
1258           |      |              (6) calling 'rdfa_strdup' from 'raptor_librdfa_rdfa_get_list_mapping'
1259           |
1260           +--> 'rdfa_strdup': events 7-9
1261                  |
1262                  |  530 | rdfa_strdup(const char* s)
1263                  |      | ^~~~~~~~~~~
1264                  |      | |
1265                  |      | (7) entry to 'rdfa_strdup'
1266                  |......
1267                  |  535 |   if(!s)
1268                  |      |     ~
1269                  |      |     |
1270                  |      |     (8) following 'false' branch (when 's' is non-NULL)...
1271                  |......
1272                  |  538 |   len = strlen(s) + 1;
1273                  |      |         ~~~~~~~~~
1274                  |      |         |
1275                  |      |         (9) ...to here
1276                  |
1277           <------+
1278           |
1279         'raptor_librdfa_rdfa_get_list_mapping': event 10
1280           |
1281           |  458 |    realkey = rdfa_strdup(subject);
1282           |      |              ^~~~~~~~~~~~~~~~~~~~
1283           |      |              |
1284           |      |              (10) returning to 'raptor_librdfa_rdfa_get_list_mapping' from 'rdfa_strdup'
1285           |
1286         'raptor_librdfa_rdfa_get_list_mapping': event 11
1287           |
1288           |../src/raptor_internal.h:888:30:
1289           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1290rdfa_utils.c:459:14: note: in expansion of macro 'rdfa_n_append_string'
1291           |  459 |    realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
1292           |      |              ^~~~~~~~~~~~~~~~~~~~
1293           |
1294           +--> 'raptor_librdfa_rdfa_n_append_string': event 12
1295                  |
1296                  |../src/raptor_internal.h:888:30:
1297                  |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1298                  |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1299                  |      |                              |
1300                  |      |                              (12) entry to 'raptor_librdfa_rdfa_n_append_string'
1301rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
1302                  |   49 | char* rdfa_n_append_string(
1303                  |      |       ^~~~~~~~~~~~~~~~~~~~
1304                  |
1305                'raptor_librdfa_rdfa_n_append_string': events 13-15
1306                  |
1307                  |   53 |    char* rval = NULL;
1308                  |      |          ^~~~
1309                  |      |          |
1310                  |      |          (13) 'rval' is NULL
1311                  |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
1312                  |      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1313                  |      |                  |
1314                  |      |                  (14) when 'realloc' fails
1315                  |......
1316                  |   57 |    return rval;
1317                  |      |           ~~~~
1318                  |      |           |
1319                  |      |           (15) 'rval' is NULL
1320                  |
1321           <------+
1322           |
1323         'raptor_librdfa_rdfa_get_list_mapping': event 16
1324           |
1325           |../src/raptor_internal.h:888:30:
1326           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1327rdfa_utils.c:459:14: note: in expansion of macro 'rdfa_n_append_string'
1328           |  459 |    realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
1329           |      |              ^~~~~~~~~~~~~~~~~~~~
1330           |
1331         'raptor_librdfa_rdfa_get_list_mapping': event 17
1332           |
1333           |../src/raptor_internal.h:888:30:
1334           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1335rdfa_utils.c:460:14: note: in expansion of macro 'rdfa_n_append_string'
1336           |  460 |    realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
1337           |      |              ^~~~~~~~~~~~~~~~~~~~
1338           |
1339           +--> 'raptor_librdfa_rdfa_n_append_string': event 18
1340                  |
1341                  |../src/raptor_internal.h:888:30:
1342                  |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1343                  |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1344                  |      |                              |
1345                  |      |                              (18) entry to 'raptor_librdfa_rdfa_n_append_string'
1346rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
1347                  |   49 | char* rdfa_n_append_string(
1348                  |      |       ^~~~~~~~~~~~~~~~~~~~
1349                  |
1350                'raptor_librdfa_rdfa_n_append_string': events 19-21
1351                  |
1352                  |   53 |    char* rval = NULL;
1353                  |      |          ^~~~
1354                  |      |          |
1355                  |      |          (19) 'rval' is NULL
1356                  |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
1357                  |      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1358                  |      |                  |
1359                  |      |                  (20) when 'realloc' fails
1360                  |......
1361                  |   57 |    return rval;
1362                  |      |           ~~~~
1363                  |      |           |
1364                  |      |           (21) 'rval' is NULL
1365                  |
1366           <------+
1367           |
1368         'raptor_librdfa_rdfa_get_list_mapping': event 22
1369           |
1370           |../src/raptor_internal.h:888:30:
1371           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1372rdfa_utils.c:460:14: note: in expansion of macro 'rdfa_n_append_string'
1373           |  460 |    realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
1374           |      |              ^~~~~~~~~~~~~~~~~~~~
1375           |
1376         'raptor_librdfa_rdfa_get_list_mapping': event 23
1377           |
1378           |../src/raptor_internal.h:883:26:
1379           |  883 | #define rdfa_get_mapping raptor_librdfa_rdfa_get_mapping
1380rdfa_utils.c:461:18: note: in expansion of macro 'rdfa_get_mapping'
1381           |  461 |    rval = (void*)rdfa_get_mapping(mapping, realkey);
1382           |      |                  ^~~~~~~~~~~~~~~~
1383           |
1384           +--> 'raptor_librdfa_rdfa_get_mapping': event 24
1385                  |
1386                  |../src/raptor_internal.h:883:26:
1387                  |  883 | #define rdfa_get_mapping raptor_librdfa_rdfa_get_mapping
1388                  |      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1389                  |      |                          |
1390                  |      |                          (24) entry to 'raptor_librdfa_rdfa_get_mapping'
1391rdfa_utils.c:427:13: note: in expansion of macro 'rdfa_get_mapping'
1392                  |  427 | const void* rdfa_get_mapping(void** mapping, const char* key)
1393                  |      |             ^~~~~~~~~~~~~~~~
1394                  |
1395                'raptor_librdfa_rdfa_get_mapping': events 25-26
1396                  |
1397                  |  433 |    while(*mptr != NULL)
1398                  |......
1399                  |  447 |    return rval;
1400                  |      |           ~~~~ 
1401                  |      |           |
1402                  |      |           (26) ...to here
1403                  |
1404           <------+
1405           |
1406         'raptor_librdfa_rdfa_get_list_mapping': event 27
1407           |
1408           |../src/raptor_internal.h:883:26:
1409           |  883 | #define rdfa_get_mapping raptor_librdfa_rdfa_get_mapping
1410rdfa_utils.c:461:18: note: in expansion of macro 'rdfa_get_mapping'
1411           |  461 |    rval = (void*)rdfa_get_mapping(mapping, realkey);
1412           |      |                  ^~~~~~~~~~~~~~~~
1413           |
1414    <------+
1415    |
1416  'raptor_librdfa_rdfa_create_list_mapping': event 28
1417    |
1418    |../src/raptor_internal.h:882:31:
1419    |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
1420rdfa_utils.c:337:23: note: in expansion of macro 'rdfa_get_list_mapping'
1421    |  337 |    value = (rdfalist*)rdfa_get_list_mapping(mapping, subject, key);
1422    |      |                       ^~~~~~~~~~~~~~~~~~~~~
1423    |
1424  'raptor_librdfa_rdfa_create_list_mapping': event 29
1425    |
1426    |  339 |    if(value == NULL)
1427    |      |      ^
1428    |      |      |
1429    |      |      (29) following 'true' branch (when 'value' is NULL)...
1430    |
1431  'raptor_librdfa_rdfa_create_list_mapping': event 30
1432    |
1433    |../src/raptor_internal.h:865:26:
1434    |  865 | #define rdfa_create_list raptor_librdfa_rdfa_create_list
1435rdfa_utils.c:342:15: note: in expansion of macro 'rdfa_create_list'
1436    |  342 |       value = rdfa_create_list(MAX_LIST_ITEMS);
1437    |      |               ^~~~~~~~~~~~~~~~
1438    |
1439  'raptor_librdfa_rdfa_create_list_mapping': event 31
1440    |
1441    |  347 |       realkey = rdfa_strdup(subject);
1442    |      |                 ^~~~~~~~~~~~~~~~~~~~
1443    |      |                 |
1444    |      |                 (31) calling 'rdfa_strdup' from 'raptor_librdfa_rdfa_create_list_mapping'
1445    |
1446    +--> 'rdfa_strdup': events 32-35
1447           |
1448           |  530 | rdfa_strdup(const char* s)
1449           |      | ^~~~~~~~~~~
1450           |      | |
1451           |      | (32) entry to 'rdfa_strdup'
1452           |......
1453           |  535 |   if(!s)
1454           |      |     ~
1455           |      |     |
1456           |      |     (33) following 'false' branch (when 's' is non-NULL)...
1457           |......
1458           |  538 |   len = strlen(s) + 1;
1459           |      |         ~~~~~~~~~
1460           |      |         |
1461           |      |         (34) ...to here
1462           |  539 |   buf = (char*)malloc(len);
1463           |  540 |   if(buf)
1464           |      |     ~
1465           |      |     |
1466           |      |     (35) following 'true' branch (when 'buf' is non-NULL)...
1467           |
1468         'rdfa_strdup': event 36
1469           |
1470           |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
1471           |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
1472           |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1473           |      |                 |
1474           |      |                 (36) ...to here
1475rdfa_utils.c:541:5: note: in expansion of macro 'memcpy'
1476           |  541 |     memcpy(buf, s, len);
1477           |      |     ^~~~~~
1478           |
1479    <------+
1480    |
1481  'raptor_librdfa_rdfa_create_list_mapping': event 37
1482    |
1483    |  347 |       realkey = rdfa_strdup(subject);
1484    |      |                 ^~~~~~~~~~~~~~~~~~~~
1485    |      |                 |
1486    |      |                 (37) returning to 'raptor_librdfa_rdfa_create_list_mapping' from 'rdfa_strdup'
1487    |
1488  'raptor_librdfa_rdfa_create_list_mapping': event 38
1489    |
1490    |../src/raptor_internal.h:888:30:
1491    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1492rdfa_utils.c:348:17: note: in expansion of macro 'rdfa_n_append_string'
1493    |  348 |       realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
1494    |      |                 ^~~~~~~~~~~~~~~~~~~~
1495    |
1496    +--> 'raptor_librdfa_rdfa_n_append_string': event 39
1497           |
1498           |../src/raptor_internal.h:888:30:
1499           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1500           |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1501           |      |                              |
1502           |      |                              (39) entry to 'raptor_librdfa_rdfa_n_append_string'
1503rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
1504           |   49 | char* rdfa_n_append_string(
1505           |      |       ^~~~~~~~~~~~~~~~~~~~
1506           |
1507         'raptor_librdfa_rdfa_n_append_string': events 40-42
1508           |
1509           |   53 |    char* rval = NULL;
1510           |      |          ^~~~
1511           |      |          |
1512           |      |          (40) 'rval' is NULL
1513           |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
1514           |      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1515           |      |                  |
1516           |      |                  (41) when 'realloc' fails
1517           |......
1518           |   57 |    return rval;
1519           |      |           ~~~~
1520           |      |           |
1521           |      |           (42) 'rval' is NULL
1522           |
1523    <------+
1524    |
1525  'raptor_librdfa_rdfa_create_list_mapping': event 43
1526    |
1527    |../src/raptor_internal.h:888:30:
1528    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1529rdfa_utils.c:348:17: note: in expansion of macro 'rdfa_n_append_string'
1530    |  348 |       realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
1531    |      |                 ^~~~~~~~~~~~~~~~~~~~
1532    |
1533  'raptor_librdfa_rdfa_create_list_mapping': event 44
1534    |
1535    |../src/raptor_internal.h:888:30:
1536    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1537rdfa_utils.c:349:17: note: in expansion of macro 'rdfa_n_append_string'
1538    |  349 |       realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
1539    |      |                 ^~~~~~~~~~~~~~~~~~~~
1540    |
1541    +--> 'raptor_librdfa_rdfa_n_append_string': event 45
1542           |
1543           |../src/raptor_internal.h:888:30:
1544           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1545           |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1546           |      |                              |
1547           |      |                              (45) entry to 'raptor_librdfa_rdfa_n_append_string'
1548rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
1549           |   49 | char* rdfa_n_append_string(
1550           |      |       ^~~~~~~~~~~~~~~~~~~~
1551           |
1552         'raptor_librdfa_rdfa_n_append_string': events 46-48
1553           |
1554           |   53 |    char* rval = NULL;
1555           |      |          ^~~~
1556           |      |          |
1557           |      |          (46) 'rval' is NULL
1558           |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
1559           |      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1560           |      |                  |
1561           |      |                  (47) when 'realloc' fails
1562           |......
1563           |   57 |    return rval;
1564           |      |           ~~~~
1565           |      |           |
1566           |      |           (48) 'rval' is NULL
1567           |
1568    <------+
1569    |
1570  'raptor_librdfa_rdfa_create_list_mapping': event 49
1571    |
1572    |../src/raptor_internal.h:888:30:
1573    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1574rdfa_utils.c:349:17: note: in expansion of macro 'rdfa_n_append_string'
1575    |  349 |       realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
1576    |      |                 ^~~~~~~~~~~~~~~~~~~~
1577    |
1578  'raptor_librdfa_rdfa_create_list_mapping': event 50
1579    |
1580    |../src/raptor_internal.h:916:29:
1581    |  916 | #define rdfa_update_mapping raptor_librdfa_rdfa_update_mapping
1582rdfa_utils.c:350:7: note: in expansion of macro 'rdfa_update_mapping'
1583    |  350 |       rdfa_update_mapping(mapping, realkey, value,
1584    |      |       ^~~~~~~~~~~~~~~~~~~
1585    |
1586    +--> 'raptor_librdfa_rdfa_update_mapping': event 51
1587           |
1588           |../src/raptor_internal.h:916:29:
1589           |  916 | #define rdfa_update_mapping raptor_librdfa_rdfa_update_mapping
1590           |      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1591           |      |                             |
1592           |      |                             (51) entry to 'raptor_librdfa_rdfa_update_mapping'
1593rdfa_utils.c:395:6: note: in expansion of macro 'rdfa_update_mapping'
1594           |  395 | void rdfa_update_mapping(void** mapping, const char* key, const void* value,
1595           |      |      ^~~~~~~~~~~~~~~~~~~
1596           |
1597         'raptor_librdfa_rdfa_update_mapping': events 52-54
1598           |
1599           |  402 |    while(!found && (*mptr != NULL))
1600           |      |          ~~~~~~~^~~~~~~~~~~~~~~~~~
1601           |      |                 |
1602           |      |                 (52) following 'true' branch...
1603           |  403 |    {
1604           |  404 |       if(strcmp((char*)*mptr, key) == 0)
1605           |      |          ~~~~~~~~~~~~~~~~~~~~~~~~~
1606           |      |          |
1607           |      |          (53) ...to here
1608           |      |          (54) argument 2 ('key') NULL where non-null expected
1609           |
1610In file included from rdfa_utils.c:28:
1611/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:77:10: note: argument 2 of 'strcmp' must be non-null
1612   77 | int      strcmp(const char *__s1, const char *__s2);
1613      |          ^~~~~~
1614rdfa_utils.c: In function 'raptor_librdfa_rdfa_get_mapping':
1615rdfa_utils.c:435:10: warning: use of NULL 'key' where non-null expected [CWE-476] [-Wanalyzer-null-argument]
1616  435 |       if(strcmp(*mptr, key) == 0)
1617      |          ^~~~~~~~~~~~~~~~~~
1618  'raptor_librdfa_rdfa_get_list_mapping': event 1
1619    |
1620    |../src/raptor_internal.h:882:31:
1621    |  882 | #define rdfa_get_list_mapping raptor_librdfa_rdfa_get_list_mapping
1622    |      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1623    |      |                               |
1624    |      |                               (1) entry to 'raptor_librdfa_rdfa_get_list_mapping'
1625rdfa_utils.c:450:13: note: in expansion of macro 'rdfa_get_list_mapping'
1626    |  450 | const void* rdfa_get_list_mapping(
1627    |      |             ^~~~~~~~~~~~~~~~~~~~~
1628    |
1629  'raptor_librdfa_rdfa_get_list_mapping': events 2-3
1630    |
1631    |  454 |    char* realkey = NULL;
1632    |      |          ^~~~~~~
1633    |      |          |
1634    |      |          (2) 'realkey' is NULL
1635    |......
1636    |  458 |    realkey = rdfa_strdup(subject);
1637    |      |              ~~~~~~~~~~~~~~~~~~~~
1638    |      |              |
1639    |      |              (3) calling 'rdfa_strdup' from 'raptor_librdfa_rdfa_get_list_mapping'
1640    |
1641    +--> 'rdfa_strdup': events 4-6
1642           |
1643           |  530 | rdfa_strdup(const char* s)
1644           |      | ^~~~~~~~~~~
1645           |      | |
1646           |      | (4) entry to 'rdfa_strdup'
1647           |......
1648           |  535 |   if(!s)
1649           |      |     ~
1650           |      |     |
1651           |      |     (5) following 'false' branch (when 's' is non-NULL)...
1652           |......
1653           |  538 |   len = strlen(s) + 1;
1654           |      |         ~~~~~~~~~
1655           |      |         |
1656           |      |         (6) ...to here
1657           |
1658    <------+
1659    |
1660  'raptor_librdfa_rdfa_get_list_mapping': event 7
1661    |
1662    |  458 |    realkey = rdfa_strdup(subject);
1663    |      |              ^~~~~~~~~~~~~~~~~~~~
1664    |      |              |
1665    |      |              (7) returning to 'raptor_librdfa_rdfa_get_list_mapping' from 'rdfa_strdup'
1666    |
1667  'raptor_librdfa_rdfa_get_list_mapping': event 8
1668    |
1669    |../src/raptor_internal.h:888:30:
1670    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1671rdfa_utils.c:459:14: note: in expansion of macro 'rdfa_n_append_string'
1672    |  459 |    realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
1673    |      |              ^~~~~~~~~~~~~~~~~~~~
1674    |
1675    +--> 'raptor_librdfa_rdfa_n_append_string': event 9
1676           |
1677           |../src/raptor_internal.h:888:30:
1678           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1679           |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1680           |      |                              |
1681           |      |                              (9) entry to 'raptor_librdfa_rdfa_n_append_string'
1682rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
1683           |   49 | char* rdfa_n_append_string(
1684           |      |       ^~~~~~~~~~~~~~~~~~~~
1685           |
1686         'raptor_librdfa_rdfa_n_append_string': events 10-12
1687           |
1688           |   53 |    char* rval = NULL;
1689           |      |          ^~~~
1690           |      |          |
1691           |      |          (10) 'rval' is NULL
1692           |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
1693           |      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1694           |      |                  |
1695           |      |                  (11) when 'realloc' fails
1696           |......
1697           |   57 |    return rval;
1698           |      |           ~~~~
1699           |      |           |
1700           |      |           (12) 'rval' is NULL
1701           |
1702    <------+
1703    |
1704  'raptor_librdfa_rdfa_get_list_mapping': event 13
1705    |
1706    |../src/raptor_internal.h:888:30:
1707    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1708rdfa_utils.c:459:14: note: in expansion of macro 'rdfa_n_append_string'
1709    |  459 |    realkey = rdfa_n_append_string(realkey, &str_size, " ", 1);
1710    |      |              ^~~~~~~~~~~~~~~~~~~~
1711    |
1712  'raptor_librdfa_rdfa_get_list_mapping': event 14
1713    |
1714    |../src/raptor_internal.h:888:30:
1715    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1716rdfa_utils.c:460:14: note: in expansion of macro 'rdfa_n_append_string'
1717    |  460 |    realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
1718    |      |              ^~~~~~~~~~~~~~~~~~~~
1719    |
1720    +--> 'raptor_librdfa_rdfa_n_append_string': event 15
1721           |
1722           |../src/raptor_internal.h:888:30:
1723           |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1724           |      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1725           |      |                              |
1726           |      |                              (15) entry to 'raptor_librdfa_rdfa_n_append_string'
1727rdfa_utils.c:49:7: note: in expansion of macro 'rdfa_n_append_string'
1728           |   49 | char* rdfa_n_append_string(
1729           |      |       ^~~~~~~~~~~~~~~~~~~~
1730           |
1731         'raptor_librdfa_rdfa_n_append_string': events 16-18
1732           |
1733           |   53 |    char* rval = NULL;
1734           |      |          ^~~~
1735           |      |          |
1736           |      |          (16) 'rval' is NULL
1737           |   54 |    rval = (char*)realloc(old_string, *string_size + suffix_size + 1);
1738           |      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1739           |      |                  |
1740           |      |                  (17) when 'realloc' fails
1741           |......
1742           |   57 |    return rval;
1743           |      |           ~~~~
1744           |      |           |
1745           |      |           (18) 'rval' is NULL
1746           |
1747    <------+
1748    |
1749  'raptor_librdfa_rdfa_get_list_mapping': event 19
1750    |
1751    |../src/raptor_internal.h:888:30:
1752    |  888 | #define rdfa_n_append_string raptor_librdfa_rdfa_n_append_string
1753rdfa_utils.c:460:14: note: in expansion of macro 'rdfa_n_append_string'
1754    |  460 |    realkey = rdfa_n_append_string(realkey, &str_size, key, strlen(key));
1755    |      |              ^~~~~~~~~~~~~~~~~~~~
1756    |
1757  'raptor_librdfa_rdfa_get_list_mapping': event 20
1758    |
1759    |../src/raptor_internal.h:883:26:
1760    |  883 | #define rdfa_get_mapping raptor_librdfa_rdfa_get_mapping
1761rdfa_utils.c:461:18: note: in expansion of macro 'rdfa_get_mapping'
1762    |  461 |    rval = (void*)rdfa_get_mapping(mapping, realkey);
1763    |      |                  ^~~~~~~~~~~~~~~~
1764    |
1765    +--> 'raptor_librdfa_rdfa_get_mapping': event 21
1766           |
1767           |../src/raptor_internal.h:883:26:
1768           |  883 | #define rdfa_get_mapping raptor_librdfa_rdfa_get_mapping
1769           |      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1770           |      |                          |
1771           |      |                          (21) entry to 'raptor_librdfa_rdfa_get_mapping'
1772rdfa_utils.c:427:13: note: in expansion of macro 'rdfa_get_mapping'
1773           |  427 | const void* rdfa_get_mapping(void** mapping, const char* key)
1774           |      |             ^~~~~~~~~~~~~~~~
1775           |
1776         'raptor_librdfa_rdfa_get_mapping': events 22-24
1777           |
1778           |  433 |    while(*mptr != NULL)
1779           |  434 |    {
1780           |  435 |       if(strcmp(*mptr, key) == 0)
1781           |      |          ~~~~~~~~~~~~~~~~~~
1782           |      |          |
1783           |      |          (23) ...to here
1784           |      |          (24) argument 2 ('key') NULL where non-null expected
1785           |
1786/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:77:10: note: argument 2 of 'strcmp' must be non-null
1787   77 | int      strcmp(const char *__s1, const char *__s2);
1788      |          ^~~~~~
1789triple.c: In function 'raptor_librdfa_rdfa_create_triple':
1790triple.c:42:18: warning: dereference of possibly-NULL 'rval' [CWE-690] [-Wanalyzer-possible-null-dereference]
1791   42 |    rval->subject = NULL;
1792  'raptor_librdfa_rdfa_create_triple': event 1
1793    |
1794    |   39 |    rdftriple* rval = (rdftriple*)malloc(sizeof(rdftriple));
1795    |      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
1796    |      |                                  |
1797    |      |                                  (1) this call could return NULL
1798    |
1799  'raptor_librdfa_rdfa_create_triple': event 2
1800    |
1801    |   42 |    rval->subject = NULL;
1802    |
1803raptor_rfc2396.c: In function 'raptor_uri_normalize_path':
1804raptor_rfc2396.c:389:33: warning: dereference of NULL 'cur' [CWE-476] [-Wanalyzer-null-dereference]
1805  389 |   if(prev && s == (cur+2) && cur[0] == '.' && cur[1] == '.') {
1806      |                              ~~~^~~
1807  'raptor_uri_normalize_path': event 1
1808    |
1809    |  305 |   prev = NULL;
1810    |
1811  'raptor_uri_normalize_path': event 2
1812    |
1813    |  306 |   cur = NULL;
1814    |
1815  'raptor_uri_normalize_path': events 3-14
1816    |
1817    |  307 |   p = NULL;
1818    |......
1819    |  310 |   for(s = path_buffer; *s; last_char=*s++) {
1820    |      |                        ~
1821    |      |                        |
1822    |      |                        (4) following 'true' branch...
1823    |......
1824    |  313 |     if(*s != '/') {
1825    |      |       ~~~
1826    |      |       ||
1827    |      |       |(5) ...to here
1828    |      |       (6) following 'true' branch...
1829    |  314 |       /* If it is the start or following a /, record a new path component */
1830    |  315 |       if(!last_char || last_char == '/') {
1831    |      |         ~
1832    |      |         |
1833    |      |         (7) ...to here
1834    |      |         (8) following 'true' branch (when 'last_char == 0')...
1835    |  316 |         /* Store 2 path components */
1836    |  317 |         if(!prev)
1837    |      |           ~
1838    |      |           |
1839    |      |           (9) ...to here
1840    |      |           (10) following 'true' branch (when 'prev' is NULL)...
1841    |  318 |           prev = s;
1842    |      |           ~~~~~~~~
1843    |      |                |
1844    |      |                (11) ...to here
1845    |......
1846    |  389 |   if(prev && s == (cur+2) && cur[0] == '.' && cur[1] == '.') {
1847    |      |     ~                        ~~~~~~
1848    |      |     |                           |
1849    |      |     |                           (13) ...to here
1850    |      |     |                           (14) dereference of NULL 'cur'
1851    |      |     (12) following 'true' branch...
1852    |
1853raptor_xml.c: In function 'raptor_xml_element_write':
1854raptor_xml.c:372:41: warning: dereference of possibly-NULL 'nspace_declarations' [CWE-690] [-Wanalyzer-possible-null-dereference]
1855  372 |       nspace_declarations[0].declaration=
1856      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1857  373 |         raptor_namespace_format_as_xml(element->name->nspace,
1858      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1859  374 |                                        &nspace_declarations[0].length);
1860      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1861  'raptor_xml_element_write': events 1-2
1862    |
1863    |  360 |   if(nstack) {
1864    |      |     ^
1865    |      |     |
1866    |      |     (1) following 'true' branch (when 'nstack' is non-NULL)...
1867    |  361 |     int nspace_max_count = element->attribute_count+1;
1868    |      |                            ~~~~~~~~~~~~~~~~~~~~~~~~
1869    |      |                                   |
1870    |      |                                   (2) ...to here
1871    |
1872  'raptor_xml_element_write': event 3
1873    |
1874    |raptor_internal.h:73:48:
1875    |   73 | #define RAPTOR_CALLOC(type, nmemb, size) (type)calloc(nmemb, size)
1876    |      |                                                ^~~~~~~~~~~~~~~~~~~
1877    |      |                                                |
1878    |      |                                                (3) this call could return NULL
1879raptor_xml.c:365:27: note: in expansion of macro 'RAPTOR_CALLOC'
1880    |  365 |     nspace_declarations = RAPTOR_CALLOC(struct nsd*, nspace_max_count,
1881    |      |                           ^~~~~~~~~~~~~
1882    |
1883  'raptor_xml_element_write': events 4-8
1884    |
1885    |  369 |   if(element->name->nspace) {
1886    |      |     ^
1887    |      |     |
1888    |      |     (4) following 'true' branch...
1889    |  370 |     if(!is_end && nstack &&
1890    |      |       ~
1891    |      |       |
1892    |      |       (5) ...to here
1893    |      |       (6) following 'true' branch...
1894    |  371 |        !raptor_namespaces_namespace_in_scope(nstack, element->name->nspace)) {
1895    |  372 |       nspace_declarations[0].declaration=
1896    |      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1897    |      |                                         |
1898    |      |                                         (8) 'nspace_declarations' could be NULL: unchecked value from (3)
1899    |  373 |         raptor_namespace_format_as_xml(element->name->nspace,
1900    |      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1901    |      |         |
1902    |      |         (7) ...to here
1903    |  374 |                                        &nspace_declarations[0].length);
1904    |      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1905    |
1906raptor_xml.c:398:71: warning: dereference of possibly-NULL 'nspace_declarations' [CWE-690] [-Wanalyzer-possible-null-dereference]
1907  398 |             nspace_declarations[nspace_declarations_count].declaration=
1908      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1909  399 |               raptor_namespace_format_as_xml(element->attributes[i]->nspace,
1910      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1911  400 |                                              &nspace_declarations[nspace_declarations_count].length);
1912      |                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1913  'raptor_xml_element_write': events 1-2
1914    |
1915    |  360 |   if(nstack) {
1916    |      |     ^
1917    |      |     |
1918    |      |     (1) following 'true' branch (when 'nstack' is non-NULL)...
1919    |  361 |     int nspace_max_count = element->attribute_count+1;
1920    |      |                            ~~~~~~~~~~~~~~~~~~~~~~~~
1921    |      |                                   |
1922    |      |                                   (2) ...to here
1923    |
1924  'raptor_xml_element_write': event 3
1925    |
1926    |raptor_internal.h:73:48:
1927    |   73 | #define RAPTOR_CALLOC(type, nmemb, size) (type)calloc(nmemb, size)
1928    |      |                                                ^~~~~~~~~~~~~~~~~~~
1929    |      |                                                |
1930    |      |                                                (3) this call could return NULL
1931raptor_xml.c:365:27: note: in expansion of macro 'RAPTOR_CALLOC'
1932    |  365 |     nspace_declarations = RAPTOR_CALLOC(struct nsd*, nspace_max_count,
1933    |      |                           ^~~~~~~~~~~~~
1934    |
1935  'raptor_xml_element_write': events 4-20
1936    |
1937    |  380 |   if(!is_end && element->attributes) {
1938    |      |     ^
1939    |      |     |
1940    |      |     (4) following 'true' branch...
1941    |  381 |     for(i = 0; i < element->attribute_count; i++) {
1942    |      |         ~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1943    |      |           |      |
1944    |      |           |      (6) following 'true' branch...
1945    |      |           (5) ...to here
1946    |  382 |       /* qname */
1947    |  383 |       if(element->attributes[i]->nspace) {
1948    |      |         ~~~~~~~~~~~~~~~~~~~~
1949    |      |         |       |
1950    |      |         |       (7) ...to here
1951    |      |         (8) following 'true' branch...
1952    |  384 |         if(nstack &&
1953    |      |           ~~~~~~~~~~
1954    |      |           |       |
1955    |      |           |       (12) following 'true' branch...
1956    |      |           (9) ...to here
1957    |      |           (10) following 'true' branch (when 'nstack' is non-NULL)...
1958    |  385 |            !raptor_namespaces_namespace_in_scope(nstack, element->attributes[i]->nspace) && element->attributes[i]->nspace != element->name->nspace) {
1959    |      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1960    |      |                                                                 |                        |         |
1961    |      |                                                                 |                        |         (13) ...to here
1962    |      |                                                                 (11) ...to here          (14) following 'true' branch...
1963    |......
1964    |  388 |           int declare_me = 1;
1965    |      |               ~~~~~~~~~~
1966    |      |               |
1967    |      |               (15) ...to here
1968    |......
1969    |  391 |           for(j = 0; j < nspace_declarations_count; j++)
1970    |      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1971    |      |                        |
1972    |      |                        (16) following 'false' branch...
1973    |......
1974    |  397 |           if(declare_me) {
1975    |      |             ~
1976    |      |             |
1977    |      |             (17) ...to here
1978    |      |             (18) following 'true' branch (when 'declare_me != 0')...
1979    |  398 |             nspace_declarations[nspace_declarations_count].declaration=
1980    |      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1981    |      |                                                                       |
1982    |      |                                                                       (20) 'nspace_declarations + nspace_declarations_count * 24' could be NULL: unchecked value from (3)
1983    |  399 |               raptor_namespace_format_as_xml(element->attributes[i]->nspace,
1984    |      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1985    |  400 |                                              &nspace_declarations[nspace_declarations_count].length);
1986    |      |                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1987    |      |                                                                  |
1988    |      |                                                                  (19) ...to here
1989    |
1990raptor_xml.c:426:67: warning: dereference of possibly-NULL 'nspace_declarations' [CWE-690] [-Wanalyzer-possible-null-dereference]
1991  426 |         nspace_declarations[nspace_declarations_count].declaration=
1992      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
1993  427 |           raptor_namespace_format_as_xml(nspace,
1994      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                   
1995  428 |                                          &nspace_declarations[nspace_declarations_count].length);
1996      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1997  'raptor_xml_element_write': events 1-2
1998    |
1999    |  360 |   if(nstack) {
2000    |      |     ^
2001    |      |     |
2002    |      |     (1) following 'true' branch (when 'nstack' is non-NULL)...
2003    |  361 |     int nspace_max_count = element->attribute_count+1;
2004    |      |                            ~~~~~~~~~~~~~~~~~~~~~~~~
2005    |      |                                   |
2006    |      |                                   (2) ...to here
2007    |
2008  'raptor_xml_element_write': event 3
2009    |
2010    |raptor_internal.h:73:48:
2011    |   73 | #define RAPTOR_CALLOC(type, nmemb, size) (type)calloc(nmemb, size)
2012    |      |                                                ^~~~~~~~~~~~~~~~~~~
2013    |      |                                                |
2014    |      |                                                (3) this call could return NULL
2015raptor_xml.c:365:27: note: in expansion of macro 'RAPTOR_CALLOC'
2016    |  365 |     nspace_declarations = RAPTOR_CALLOC(struct nsd*, nspace_max_count,
2017    |      |                           ^~~~~~~~~~~~~
2018    |
2019  'raptor_xml_element_write': events 4-12
2020    |
2021    |  411 |   if(!is_end && nstack && element->declared_nspaces &&
2022    |      |     ^
2023    |      |     |
2024    |      |     (4) following 'true' branch...
2025    |  412 |      raptor_sequence_size(element->declared_nspaces) > 0) {
2026    |  413 |     for(i = 0; i< (unsigned int)raptor_sequence_size(element->declared_nspaces); i++) {
2027    |      |         ~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2028    |      |           |     |
2029    |      |           |     (6) following 'true' branch...
2030    |      |           (5) ...to here
2031    |  414 |       raptor_namespace* nspace = (raptor_namespace*)raptor_sequence_get_at(element->declared_nspaces, i);
2032    |      |                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2033    |      |                                                     |
2034    |      |                                                     (7) ...to here
2035    |......
2036    |  419 |       for(j = 0; j < nspace_declarations_count; j++)
2037    |      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2038    |      |                    |
2039    |      |                    (8) following 'false' branch...
2040    |......
2041    |  425 |       if(declare_me) {
2042    |      |         ~
2043    |      |         |
2044    |      |         (9) ...to here
2045    |      |         (10) following 'true' branch (when 'declare_me != 0')...
2046    |  426 |         nspace_declarations[nspace_declarations_count].declaration=
2047    |      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2048    |      |                                                                   |
2049    |      |                                                                   (12) 'nspace_declarations + nspace_declarations_count * 24' could be NULL: unchecked value from (3)
2050    |  427 |           raptor_namespace_format_as_xml(nspace,
2051    |      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2052    |  428 |                                          &nspace_declarations[nspace_declarations_count].length);
2053    |      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2054    |      |                                                              |
2055    |      |                                                              (11) ...to here
2056    |
2057In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
2058                 from raptor_xml_writer.c:31:
2059raptor_xml_writer.c: In function 'raptor_xml_writer_start_element_common':
2060/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17: warning: use of possibly-NULL 'buffer' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
2061   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
2062      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2063raptor_xml_writer.c:295:5: note: in expansion of macro 'memcpy'
2064  295 |     memcpy(buffer, XML_LANG_PREFIX, XML_LANG_PREFIX_LEN);
2065      |     ^~~~~~
2066  'raptor_xml_writer_start_element': events 1-2
2067    |
2068    |  569 | raptor_xml_writer_start_element(raptor_xml_writer* xml_writer,
2069    |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2070    |      | |
2071    |      | (1) entry to 'raptor_xml_writer_start_element'
2072    |......
2073    |  579 |   raptor_xml_writer_start_element_common(xml_writer, element,
2074    |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2075    |      |   |
2076    |      |   (2) calling 'raptor_xml_writer_start_element_common' from 'raptor_xml_writer_start_element'
2077    |  580 |                                          XML_WRITER_AUTO_EMPTY(xml_writer));
2078    |      |                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2079    |
2080    +--> 'raptor_xml_writer_start_element_common': events 3-16
2081           |
2082           |  178 | raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer,
2083           |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2084           |      | |
2085           |      | (3) entry to 'raptor_xml_writer_start_element_common'
2086           |......
2087           |  190 |   if(nstack) {
2088           |      |     ~
2089           |      |     |
2090           |      |     (4) following 'true' branch (when 'nstack' is non-NULL)...
2091           |  191 |     int nspace_max_count = element->attribute_count * 2; /* attr and value */
2092           |      |                            ~~~~~~~~~~~~~~~~~~~~~~~~
2093           |      |                                   |
2094           |      |                                   (5) ...to here
2095           |......
2096           |  201 |     if(!nspace_declarations)
2097           |      |       ~
2098           |      |       |
2099           |      |       (6) following 'false' branch (when 'nspace_declarations' is non-NULL)...
2100           |......
2101           |  205 |   if(element->name->nspace) {
2102           |      |      ~~~~~~~~~~~~~
2103           |      |             |
2104           |      |             (7) ...to here
2105           |......
2106           |  217 |   if(nstack && element->attributes) {
2107           |      |     ~
2108           |      |     |
2109           |      |     (8) following 'true' branch...
2110           |  218 |     for(i = 0; i < element->attribute_count; i++) {
2111           |      |         ~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2112           |      |           |      |
2113           |      |           |      (10) following 'true' branch...
2114           |      |           (9) ...to here
2115           |  219 |       /* qname */
2116           |  220 |       if(element->attributes[i]->nspace) {
2117           |      |          ~~~~~~~~~~~~~~~~~~~
2118           |      |                 |
2119           |      |                 (11) ...to here
2120           |......
2121           |  251 |       if(!nspace_declarations[nspace_declarations_count].declaration)
2122           |      |         ~
2123           |      |         |
2124           |      |         (12) following 'false' branch...
2125           |  252 |         goto error;
2126           |  253 |       nspace_declarations[nspace_declarations_count].nspace = NULL;
2127           |      |                          ~
2128           |      |                          |
2129           |      |                          (13) ...to here
2130           |......
2131           |  259 |   if(nstack && element->declared_nspaces &&
2132           |      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2133           |      |             |
2134           |      |             (14) following 'false' branch...
2135           |......
2136           |  286 |   if(nstack && element->xml_language) {
2137           |      |     ~
2138           |      |     |
2139           |      |     (15) ...to here
2140           |      |     (16) following 'true' branch...
2141           |
2142         'raptor_xml_writer_start_element_common': event 17
2143           |
2144           |  287 |     size_t lang_len = strlen(RAPTOR_GOOD_CAST(char*, element->xml_language));
2145raptor_internal.h:1516:36: note: in definition of macro 'RAPTOR_GOOD_CAST'
2146           | 1516 | #define RAPTOR_GOOD_CAST(t, v) (t)(v)
2147           |      |                                    ^
2148           |
2149         'raptor_xml_writer_start_element_common': event 18
2150           |
2151           |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
2152           |      |                                         ^~~~~~~~~~~~
2153           |      |                                         |
2154           |      |                                         (18) this call could return NULL
2155raptor_xml_writer.c:291:29: note: in expansion of macro 'RAPTOR_MALLOC'
2156           |  291 |     unsigned char* buffer = RAPTOR_MALLOC(unsigned char*, buf_length + 1);
2157           |      |                             ^~~~~~~~~~~~~
2158           |
2159         'raptor_xml_writer_start_element_common': event 19
2160           |
2161           |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
2162           |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
2163           |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2164           |      |                 |
2165           |      |                 (19) argument 1 ('buffer') from (18) could be NULL where non-null expected
2166raptor_xml_writer.c:295:5: note: in expansion of macro 'memcpy'
2167           |  295 |     memcpy(buffer, XML_LANG_PREFIX, XML_LANG_PREFIX_LEN);
2168           |      |     ^~~~~~
2169           |
2170<built-in>: note: argument 1 of '__builtin___memcpy_chk' must be non-null
2171turtle_lexer.c: In function 'yy_get_next_buffer':
2172turtle_lexer.c:2097:48: warning: comparison of integer expressions of different signedness: 'yy_size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
2173 2097 |         if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2174      |                                                ^
2175./turtle_lexer.l: In function 'turtle_lexer_lex':
2176turtle_lexer.c:1069:27: warning: leak of 'malloc(len + 1)' [CWE-401] [-Wanalyzer-malloc-leak]
2177 1069 |     #    define yylval yyg->yylval_r
2178      |                        ~~~^~~~~~~~~~
2179./turtle_lexer.l:274:23: note: in expansion of macro 'yylval'
2180  274 |                     TURTLE_LEXER_OOM();
2181      |                       ^~~~~~
2182  'turtle_lexer_lex': events 1-2
2183    |
2184    |./turtle_lexer.l:218:6:
2185    |  218 |     return 1;
2186    |      |     ~^~~~~~~~                                   
2187    |      |     ||
2188    |      |     |(1) 'setjmp' called here
2189    |      |     (2) following 'false' branch...
2190    |
2191  'turtle_lexer_lex': event 3
2192    |
2193    |cc1:
2194    | (3): ...to here
2195    |
2196  'turtle_lexer_lex': event 4
2197    |
2198    |raptor_internal.h:72:41:
2199    |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
2200    |      |                                         ^~~~~~~~~~~~
2201    |      |                                         |
2202    |      |                                         (4) allocated here
2203./turtle_lexer.l:273:36: note: in expansion of macro 'RAPTOR_MALLOC'
2204    |  273 |                   if(!yylval->string)
2205    |      |                                    ^~           
2206    |
2207  'turtle_lexer_lex': event 5
2208    |
2209    |turtle_lexer.c:1069:27:
2210    | 1069 |     #    define yylval yyg->yylval_r
2211    |      |                        ~~~^~~~~~~~~~
2212    |      |                           |
2213    |      |                           (5) 'malloc(len + 1)' leaks here; was allocated at (4)
2214./turtle_lexer.l:274:23: note: in expansion of macro 'yylval'
2215    |  274 |                     TURTLE_LEXER_OOM();
2216    |      |                       ^~~~~~
2217    |
2218turtle_lexer.c:1069:27: warning: leak of 'malloc(len + 1)' [CWE-401] [-Wanalyzer-malloc-leak]
2219 1069 |     #    define yylval yyg->yylval_r
2220      |                        ~~~^~~~~~~~~~
2221./turtle_lexer.l:342:23: note: in expansion of macro 'yylval'
2222  342 |                     TURTLE_LEXER_OOM();
2223      |                       ^~~~~~
2224  'turtle_lexer_lex': events 1-2
2225    |
2226    |./turtle_lexer.l:218:6:
2227    |  218 |     return 1;
2228    |      |     ~^~~~~~~~                                   
2229    |      |     ||
2230    |      |     |(1) 'setjmp' called here
2231    |      |     (2) following 'false' branch...
2232    |
2233  'turtle_lexer_lex': event 3
2234    |
2235    |cc1:
2236    | (3): ...to here
2237    |
2238  'turtle_lexer_lex': event 4
2239    |
2240    |raptor_internal.h:72:41:
2241    |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
2242    |      |                                         ^~~~~~~~~~~~
2243    |      |                                         |
2244    |      |                                         (4) allocated here
2245./turtle_lexer.l:341:36: note: in expansion of macro 'RAPTOR_MALLOC'
2246    |  341 |                   if(!yylval->string)
2247    |      |                                    ^~           
2248    |
2249  'turtle_lexer_lex': event 5
2250    |
2251    |turtle_lexer.c:1069:27:
2252    | 1069 |     #    define yylval yyg->yylval_r
2253    |      |                        ~~~^~~~~~~~~~
2254    |      |                           |
2255    |      |                           (5) 'malloc(len + 1)' leaks here; was allocated at (4)
2256./turtle_lexer.l:342:23: note: in expansion of macro 'yylval'
2257    |  342 |                     TURTLE_LEXER_OOM();
2258    |      |                       ^~~~~~
2259    |
2260turtle_lexer.c: In function 'turtle_lexer__init_buffer':
2261turtle_lexer.c:2382:26: warning: dereference of NULL 'b' [CWE-476] [-Wanalyzer-null-dereference]
2262 2382 |         b->yy_input_file = file;
2263      |         ~~~~~~~~~~~~~~~~~^~~~~~
2264  'turtle_lexer_lex': event 1
2265    |
2266    |turtle_lexer.c:96:15:
2267    |   96 | #define yylex turtle_lexer_lex
2268    |      |               ^~~~~~~~~~~~~~~~
2269    |      |               |
2270    |      |               (1) entry to 'turtle_lexer_lex'
2271turtle_lexer.c:1228:21: note: in expansion of macro 'yylex'
2272    | 1228 | #define YY_DECL int yylex \
2273    |      |                     ^~~~~
2274turtle_lexer.c:1249:1: note: in expansion of macro 'YY_DECL'
2275    | 1249 | YY_DECL
2276    |      | ^~~~~~~
2277    |
2278  'turtle_lexer_lex': events 2-3
2279    |
2280    |./turtle_lexer.l:218:6:
2281    |  218 |     return 1;
2282    |      |     ~^~~~~~~~                                   
2283    |      |     ||
2284    |      |     |(2) 'setjmp' called here
2285    |      |     (3) following 'false' branch...
2286    |
2287  'turtle_lexer_lex': event 4
2288    |
2289    |cc1:
2290    | (4): ...to here
2291    |
2292  'turtle_lexer_lex': event 5
2293    |
2294    |turtle_lexer.c:1911:31:
2295    | 1911 |                 else switch ( yy_get_next_buffer( yyscanner ) )
2296    |      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2297    |      |                               |
2298    |      |                               (5) calling 'yy_get_next_buffer' from 'turtle_lexer_lex'
2299    |
2300    +--> 'yy_get_next_buffer': events 6-7
2301           |
2302           | 1980 | static int yy_get_next_buffer (yyscan_t yyscanner)
2303           |      |            ^~~~~~~~~~~~~~~~~~
2304           |      |            |
2305           |      |            (6) entry to 'yy_get_next_buffer'
2306           |......
2307           | 1988 |         if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
2308           |      |            ~
2309           |      |            |
2310           |      |            (7) following 'false' branch...
2311           |
2312         'yy_get_next_buffer': event 8
2313           |
2314           |turtle_lexer.c:501:37:
2315           |  501 | #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
2316           |      |                                  ~~~^~~~~~~~~~~~~~~~~
2317           |      |                                     |
2318           |      |                                     (8) ...to here
2319turtle_lexer.c:1992:14: note: in expansion of macro 'YY_CURRENT_BUFFER_LVALUE'
2320           | 1992 |         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2321           |      |              ^~~~~~~~~~~~~~~~~~~~~~~~
2322           |
2323         'yy_get_next_buffer': events 9-15
2324           |
2325           | 1992 |         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2326           |      |            ^
2327           |      |            |
2328           |      |            (9) following 'false' branch...
2329           |......
2330           | 2014 |         number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
2331           |      |                                 ~~~~~~~~~~~~~~~
2332           |      |                                    |
2333           |      |                                    (10) ...to here
2334           |......
2335           | 2019 |         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2336           |      |            ~
2337           |      |            |
2338           |      |            (11) following 'true' branch...
2339           |......
2340           | 2023 |                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
2341           |      |                                                        ~~~~~~~~~~~~~~~~~~~
2342           |      |                                                                        |
2343           |      |                                                                        (12) ...to here
2344           |......
2345           | 2078 |         if ( yyg->yy_n_chars == 0 )
2346           |      |            ~
2347           |      |            |
2348           |      |            (13) following 'true' branch...
2349           | 2079 |                 {
2350           | 2080 |                 if ( number_to_move == YY_MORE_ADJ )
2351           |      |                    ~
2352           |      |                    |
2353           |      |                    (14) ...to here
2354           |      |                    (15) following 'true' branch (when 'number_to_move == 0')...
2355           |
2356         'yy_get_next_buffer': event 16
2357           |
2358           | 2082 |                         ret_val = EOB_ACT_END_OF_FILE;
2359           |
2360         'yy_get_next_buffer': event 17
2361           |
2362           |turtle_lexer.c:102:19:
2363           |  102 | #define yyrestart turtle_lexer_restart
2364turtle_lexer.c:2083:25: note: in expansion of macro 'yyrestart'
2365           | 2083 |                         yyrestart( yyin  , yyscanner);
2366           |      |                         ^~~~~~~~~
2367           |
2368           +--> 'turtle_lexer_restart': event 18
2369                  |
2370                  |turtle_lexer.c:102:19:
2371                  |  102 | #define yyrestart turtle_lexer_restart
2372                  |      |                   ^~~~~~~~~~~~~~~~~~~~
2373                  |      |                   |
2374                  |      |                   (18) entry to 'turtle_lexer_restart'
2375turtle_lexer.c:2261:10: note: in expansion of macro 'yyrestart'
2376                  | 2261 |     void yyrestart  (FILE * input_file , yyscan_t yyscanner)
2377                  |      |          ^~~~~~~~~
2378                  |
2379                'turtle_lexer_restart': event 19
2380                  |
2381                  |turtle_lexer.c:54:24:
2382                  |   54 | #define yy_init_buffer turtle_lexer__init_buffer
2383turtle_lexer.c:2271:9: note: in expansion of macro 'yy_init_buffer'
2384                  | 2271 |         yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2385                  |      |         ^~~~~~~~~~~~~~
2386                  |
2387                'turtle_lexer_restart': event 20
2388                  |
2389                  |turtle_lexer.c:54:24:
2390                  |   54 | #define yy_init_buffer turtle_lexer__init_buffer
2391turtle_lexer.c:2271:9: note: in expansion of macro 'yy_init_buffer'
2392                  | 2271 |         yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2393                  |      |         ^~~~~~~~~~~~~~
2394                  |
2395                'turtle_lexer_restart': event 21
2396                  |
2397                  |turtle_lexer.c:54:24:
2398                  |   54 | #define yy_init_buffer turtle_lexer__init_buffer
2399turtle_lexer.c:2271:9: note: in expansion of macro 'yy_init_buffer'
2400                  | 2271 |         yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2401                  |      |         ^~~~~~~~~~~~~~
2402                  |
2403                'turtle_lexer_restart': event 22
2404                  |
2405                  |turtle_lexer.c:54:24:
2406                  |   54 | #define yy_init_buffer turtle_lexer__init_buffer
2407turtle_lexer.c:2271:9: note: in expansion of macro 'yy_init_buffer'
2408                  | 2271 |         yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2409                  |      |         ^~~~~~~~~~~~~~
2410                  |
2411                  +--> 'turtle_lexer__init_buffer': event 23
2412                         |
2413                         |turtle_lexer.c:54:24:
2414                         |   54 | #define yy_init_buffer turtle_lexer__init_buffer
2415                         |      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
2416                         |      |                        |
2417                         |      |                        (23) entry to 'turtle_lexer__init_buffer'
2418turtle_lexer.c:2374:17: note: in expansion of macro 'yy_init_buffer'
2419                         | 2374 |     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
2420                         |      |                 ^~~~~~~~~~~~~~
2421                         |
2422                       'turtle_lexer__init_buffer': event 24
2423                         |
2424                         |turtle_lexer.c:60:25:
2425                         |   60 | #define yy_flush_buffer turtle_lexer__flush_buffer
2426turtle_lexer.c:2380:9: note: in expansion of macro 'yy_flush_buffer'
2427                         | 2380 |         yy_flush_buffer( b , yyscanner);
2428                         |      |         ^~~~~~~~~~~~~~~
2429                         |
2430                         +--> 'turtle_lexer__flush_buffer': event 25
2431                                |
2432                                |turtle_lexer.c:60:25:
2433                                |   60 | #define yy_flush_buffer turtle_lexer__flush_buffer
2434                                |      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
2435                                |      |                         |
2436                                |      |                         (25) entry to 'turtle_lexer__flush_buffer'
2437turtle_lexer.c:2403:10: note: in expansion of macro 'yy_flush_buffer'
2438                                | 2403 |     void yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
2439                                |      |          ^~~~~~~~~~~~~~~
2440                                |
2441                              'turtle_lexer__flush_buffer': events 26-27
2442                                |
2443                                | 2406 |         if ( ! b )
2444                                |      |            ^
2445                                |      |            |
2446                                |      |            (26) following 'true' branch (when 'b' is NULL)...
2447                                | 2407 |                 return;
2448                                |      |                 ~~~~~~
2449                                |      |                 |
2450                                |      |                 (27) ...to here
2451                                |
2452                         <------+
2453                         |
2454                       'turtle_lexer__init_buffer': event 28
2455                         |
2456                         |turtle_lexer.c:60:25:
2457                         |   60 | #define yy_flush_buffer turtle_lexer__flush_buffer
2458turtle_lexer.c:2380:9: note: in expansion of macro 'yy_flush_buffer'
2459                         | 2380 |         yy_flush_buffer( b , yyscanner);
2460                         |      |         ^~~~~~~~~~~~~~~
2461                         |
2462                       'turtle_lexer__init_buffer': event 29
2463                         |
2464                         | 2382 |         b->yy_input_file = file;
2465                         |      |         ~~~~~~~~~~~~~~~~~^~~~~~
2466                         |      |                          |
2467                         |      |                          (29) dereference of NULL 'b'
2468                         |
2469turtle_parser.c: In function 'turtle_parser_parse':
2470turtle_parser.c:530:7: warning: use of uninitialized value 'yyss' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
2471  530 |       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2472      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2473turtle_parser.c:515:9: note: in expansion of macro 'YYCOPY'
2474  515 |         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2475      |         ^~~~~~
2476turtle_parser.c:1645:9: note: in expansion of macro 'YYSTACK_RELOCATE'
2477 1645 |         YYSTACK_RELOCATE (yyss_alloc, yyss);
2478      |         ^~~~~~~~~~~~~~~~
2479  'turtle_parser_parse': events 1-9
2480    |
2481    | 1539 |     yy_state_t yyssa[YYINITDEPTH];
2482    |      |                ^~~~~
2483    |      |                |
2484    |      |                (1) region created on stack here
2485    |      |                (2) capacity: 200 bytes
2486    |......
2487    | 1603 |   if (yyss + yystacksize - 1 <= yyssp)
2488    |      |      ~         
2489    |      |      |
2490    |      |      (3) following 'true' branch...
2491    |......
2492    | 1609 |       YYPTRDIFF_T yysize = yyssp - yyss + 1;
2493    |      |                            ~~~~~~~~~~~~
2494    |      |                                  |
2495    |      |                                  (4) ...to here
2496    |......
2497    | 1632 |       if (YYMAXDEPTH <= yystacksize)
2498    |      |          ~     
2499    |      |          |
2500    |      |          (5) following 'false' branch (when 'yystacksize <= 9999')...
2501    | 1633 |         goto yyexhaustedlab;
2502    | 1634 |       yystacksize *= 2;
2503    |      |       ~~~~~~~~~~~~~~~~
2504    |      |                   |
2505    |      |                   (6) ...to here
2506    | 1635 |       if (YYMAXDEPTH < yystacksize)
2507    |      |          ~     
2508    |      |          |
2509    |      |          (7) following 'false' branch (when 'yystacksize <= 10000')...
2510    |......
2511    | 1639 |         yy_state_t *yyss1 = yyss;
2512    |      |                     ~~~~~
2513    |      |                     |
2514    |      |                     (8) ...to here
2515    |......
2516    | 1643 |         if (! yyptr)
2517    |      |            ~   
2518    |      |            |
2519    |      |            (9) following 'false' branch (when 'yyptr' is non-NULL)...
2520    |
2521  'turtle_parser_parse': event 10
2522    |
2523    |turtle_parser.c:530:7:
2524    |  530 |       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2525    |      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2526    |      |       |
2527    |      |       (10) ...to here
2528turtle_parser.c:515:9: note: in expansion of macro 'YYCOPY'
2529    |  515 |         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2530    |      |         ^~~~~~
2531turtle_parser.c:1645:9: note: in expansion of macro 'YYSTACK_RELOCATE'
2532    | 1645 |         YYSTACK_RELOCATE (yyss_alloc, yyss);
2533    |      |         ^~~~~~~~~~~~~~~~
2534    |
2535  'turtle_parser_parse': event 11
2536    |
2537    |turtle_parser.c:530:7:
2538    |  530 |       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2539    |      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2540    |      |       |
2541    |      |       (11) use of uninitialized value 'yyss' here
2542turtle_parser.c:515:9: note: in expansion of macro 'YYCOPY'
2543    |  515 |         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2544    |      |         ^~~~~~
2545turtle_parser.c:1645:9: note: in expansion of macro 'YYSTACK_RELOCATE'
2546    | 1645 |         YYSTACK_RELOCATE (yyss_alloc, yyss);
2547    |      |         ^~~~~~~~~~~~~~~~
2548    |
2549turtle_parser.c:530:7: warning: use of uninitialized value 'yyss' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
2550  530 |       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2551      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2552turtle_parser.c:515:9: note: in expansion of macro 'YYCOPY'
2553  515 |         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2554      |         ^~~~~~
2555turtle_parser.c:1645:9: note: in expansion of macro 'YYSTACK_RELOCATE'
2556 1645 |         YYSTACK_RELOCATE (yyss_alloc, yyss);
2557      |         ^~~~~~~~~~~~~~~~
2558  'turtle_parse': events 1-6
2559    |
2560    |./turtle_parser.y:1410:1:
2561    | 1410 | turtle_parse(raptor_parser *rdf_parser, const char *string, size_t length)
2562    |      | ^~~~~~~~~~~~
2563    |      | |
2564    |      | (1) entry to 'turtle_parse'
2565    |......
2566    | 1415 |   if(!string || !*string)
2567    |      |     ~
2568    |      |     |
2569    |      |     (2) following 'false' branch...
2570    |......
2571    | 1418 |   if(turtle_lexer_lex_init(&turtle_parser->scanner))
2572    |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2573    |      |     ||
2574    |      |     |(3) ...to here
2575    |      |     (4) following 'false' branch...
2576    | 1419 |     return 1;
2577    | 1420 |   turtle_parser->scanner_set = 1;
2578    |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2579    |      |                              |
2580    |      |                              (5) ...to here
2581    |......
2582    | 1430 |   rc = turtle_parser_parse(rdf_parser, turtle_parser->scanner);
2583    |      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2584    |      |        |
2585    |      |        (6) calling 'turtle_parser_parse' from 'turtle_parse'
2586    |
2587    +--> 'turtle_parser_parse': event 7
2588           |
2589           |turtle_parser.c:69:25:
2590           |   69 | #define yyparse         turtle_parser_parse
2591           |      |                         ^~~~~~~~~~~~~~~~~~~
2592           |      |                         |
2593           |      |                         (7) entry to 'turtle_parser_parse'
2594turtle_parser.c:1509:1: note: in expansion of macro 'yyparse'
2595           | 1509 | yyparse (raptor_parser* rdf_parser, void* yyscanner)
2596           |      | ^~~~~~~
2597           |
2598         'turtle_parser_parse': events 8-16
2599           |
2600           | 1539 |     yy_state_t yyssa[YYINITDEPTH];
2601           |      |                ^~~~~
2602           |      |                |
2603           |      |                (8) region created on stack here
2604           |      |                (9) capacity: 200 bytes
2605           |......
2606           | 1603 |   if (yyss + yystacksize - 1 <= yyssp)
2607           |      |      ~         
2608           |      |      |
2609           |      |      (10) following 'true' branch...
2610           |......
2611           | 1609 |       YYPTRDIFF_T yysize = yyssp - yyss + 1;
2612           |      |                            ~~~~~~~~~~~~
2613           |      |                                  |
2614           |      |                                  (11) ...to here
2615           |......
2616           | 1632 |       if (YYMAXDEPTH <= yystacksize)
2617           |      |          ~     
2618           |      |          |
2619           |      |          (12) following 'false' branch (when 'yystacksize <= 9999')...
2620           | 1633 |         goto yyexhaustedlab;
2621           | 1634 |       yystacksize *= 2;
2622           |      |       ~~~~~~~~~~~~~~~~
2623           |      |                   |
2624           |      |                   (13) ...to here
2625           | 1635 |       if (YYMAXDEPTH < yystacksize)
2626           |      |          ~     
2627           |      |          |
2628           |      |          (14) following 'false' branch (when 'yystacksize <= 10000')...
2629           |......
2630           | 1639 |         yy_state_t *yyss1 = yyss;
2631           |      |                     ~~~~~
2632           |      |                     |
2633           |      |                     (15) ...to here
2634           |......
2635           | 1643 |         if (! yyptr)
2636           |      |            ~   
2637           |      |            |
2638           |      |            (16) following 'false' branch (when 'yyptr' is non-NULL)...
2639           |
2640         'turtle_parser_parse': event 17
2641           |
2642           |turtle_parser.c:530:7:
2643           |  530 |       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2644           |      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2645           |      |       |
2646           |      |       (17) ...to here
2647turtle_parser.c:515:9: note: in expansion of macro 'YYCOPY'
2648           |  515 |         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2649           |      |         ^~~~~~
2650turtle_parser.c:1645:9: note: in expansion of macro 'YYSTACK_RELOCATE'
2651           | 1645 |         YYSTACK_RELOCATE (yyss_alloc, yyss);
2652           |      |         ^~~~~~~~~~~~~~~~
2653           |
2654         'turtle_parser_parse': event 18
2655           |
2656           |turtle_parser.c:530:7:
2657           |  530 |       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2658           |      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2659           |      |       |
2660           |      |       (18) use of uninitialized value 'yyss' here
2661turtle_parser.c:515:9: note: in expansion of macro 'YYCOPY'
2662           |  515 |         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2663           |      |         ^~~~~~
2664turtle_parser.c:1645:9: note: in expansion of macro 'YYSTACK_RELOCATE'
2665           | 1645 |         YYSTACK_RELOCATE (yyss_alloc, yyss);
2666           |      |         ^~~~~~~~~~~~~~~~
2667           |
2668turtle_parser.c:530:7: warning: use of uninitialized value 'yyss' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
2669  530 |       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2670      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2671turtle_parser.c:515:9: note: in expansion of macro 'YYCOPY'
2672  515 |         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2673      |         ^~~~~~
2674turtle_parser.c:1645:9: note: in expansion of macro 'YYSTACK_RELOCATE'
2675 1645 |         YYSTACK_RELOCATE (yyss_alloc, yyss);
2676      |         ^~~~~~~~~~~~~~~~
2677  'raptor_turtle_parse_chunk': events 1-4
2678    |
2679    |./turtle_parser.y:1670:1:
2680    | 1670 | raptor_turtle_parse_chunk(raptor_parser* rdf_parser,
2681    |      | ^~~~~~~~~~~~~~~~~~~~~~~~~
2682    |      | |
2683    |      | (1) entry to 'raptor_turtle_parse_chunk'
2684    |......
2685    | 1707 |   if(is_end && !turtle_parser->end_of_buffer) {
2686    |      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2687    |      |             |
2688    |      |             (2) following 'false' branch...
2689    |......
2690    | 1713 |   ptr = turtle_parser->buffer + turtle_parser->consumed;
2691    |      |         ~~~~~~~~~~~~~~~~~~~~~
2692    |      |                      |
2693    |      |                      (3) ...to here
2694    |......
2695    | 1750 |   rc = turtle_parse(rdf_parser, turtle_parser->buffer, turtle_parser->consumable);
2696    |      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2697    |      |        |
2698    |      |        (4) calling 'turtle_parse' from 'raptor_turtle_parse_chunk'
2699    |
2700    +--> 'turtle_parse': events 5-10
2701           |
2702           | 1410 | turtle_parse(raptor_parser *rdf_parser, const char *string, size_t length)
2703           |      | ^~~~~~~~~~~~
2704           |      | |
2705           |      | (5) entry to 'turtle_parse'
2706           |......
2707           | 1415 |   if(!string || !*string)
2708           |      |     ~
2709           |      |     |
2710           |      |     (6) following 'false' branch...
2711           |......
2712           | 1418 |   if(turtle_lexer_lex_init(&turtle_parser->scanner))
2713           |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2714           |      |     ||
2715           |      |     |(7) ...to here
2716           |      |     (8) following 'false' branch...
2717           | 1419 |     return 1;
2718           | 1420 |   turtle_parser->scanner_set = 1;
2719           |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2720           |      |                              |
2721           |      |                              (9) ...to here
2722           |......
2723           | 1430 |   rc = turtle_parser_parse(rdf_parser, turtle_parser->scanner);
2724           |      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2725           |      |        |
2726           |      |        (10) calling 'turtle_parser_parse' from 'turtle_parse'
2727           |
2728           +--> 'turtle_parser_parse': event 11
2729                  |
2730                  |turtle_parser.c:69:25:
2731                  |   69 | #define yyparse         turtle_parser_parse
2732                  |      |                         ^~~~~~~~~~~~~~~~~~~
2733                  |      |                         |
2734                  |      |                         (11) entry to 'turtle_parser_parse'
2735turtle_parser.c:1509:1: note: in expansion of macro 'yyparse'
2736                  | 1509 | yyparse (raptor_parser* rdf_parser, void* yyscanner)
2737                  |      | ^~~~~~~
2738                  |
2739                'turtle_parser_parse': events 12-20
2740                  |
2741                  | 1539 |     yy_state_t yyssa[YYINITDEPTH];
2742                  |      |                ^~~~~
2743                  |      |                |
2744                  |      |                (12) region created on stack here
2745                  |      |                (13) capacity: 200 bytes
2746                  |......
2747                  | 1603 |   if (yyss + yystacksize - 1 <= yyssp)
2748                  |      |      ~         
2749                  |      |      |
2750                  |      |      (14) following 'true' branch...
2751                  |......
2752                  | 1609 |       YYPTRDIFF_T yysize = yyssp - yyss + 1;
2753                  |      |                            ~~~~~~~~~~~~
2754                  |      |                                  |
2755                  |      |                                  (15) ...to here
2756                  |......
2757                  | 1632 |       if (YYMAXDEPTH <= yystacksize)
2758                  |      |          ~     
2759                  |      |          |
2760                  |      |          (16) following 'false' branch (when 'yystacksize <= 9999')...
2761                  | 1633 |         goto yyexhaustedlab;
2762                  | 1634 |       yystacksize *= 2;
2763                  |      |       ~~~~~~~~~~~~~~~~
2764                  |      |                   |
2765                  |      |                   (17) ...to here
2766                  | 1635 |       if (YYMAXDEPTH < yystacksize)
2767                  |      |          ~     
2768                  |      |          |
2769                  |      |          (18) following 'false' branch (when 'yystacksize <= 10000')...
2770                  |......
2771                  | 1639 |         yy_state_t *yyss1 = yyss;
2772                  |      |                     ~~~~~
2773                  |      |                     |
2774                  |      |                     (19) ...to here
2775                  |......
2776                  | 1643 |         if (! yyptr)
2777                  |      |            ~   
2778                  |      |            |
2779                  |      |            (20) following 'false' branch (when 'yyptr' is non-NULL)...
2780                  |
2781                'turtle_parser_parse': event 21
2782                  |
2783                  |turtle_parser.c:530:7:
2784                  |  530 |       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2785                  |      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2786                  |      |       |
2787                  |      |       (21) ...to here
2788turtle_parser.c:515:9: note: in expansion of macro 'YYCOPY'
2789                  |  515 |         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2790                  |      |         ^~~~~~
2791turtle_parser.c:1645:9: note: in expansion of macro 'YYSTACK_RELOCATE'
2792                  | 1645 |         YYSTACK_RELOCATE (yyss_alloc, yyss);
2793                  |      |         ^~~~~~~~~~~~~~~~
2794                  |
2795                'turtle_parser_parse': event 22
2796                  |
2797                  |turtle_parser.c:530:7:
2798                  |  530 |       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
2799                  |      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2800                  |      |       |
2801                  |      |       (22) use of uninitialized value 'yyss' here
2802turtle_parser.c:515:9: note: in expansion of macro 'YYCOPY'
2803                  |  515 |         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
2804                  |      |         ^~~~~~
2805turtle_parser.c:1645:9: note: in expansion of macro 'YYSTACK_RELOCATE'
2806                  | 1645 |         YYSTACK_RELOCATE (yyss_alloc, yyss);
2807                  |      |         ^~~~~~~~~~~~~~~~
2808                  |
2809turtle_parser.c:1769:9: warning: use of uninitialized value '*<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
2810 1769 |   yyval = yyvsp[1-yylen];
2811      |   ~~~~~~^~~~~~~~~~~~~~~~
2812  'turtle_parser_parse': events 1-10
2813    |
2814    | 1544 |     YYSTYPE yyvsa[YYINITDEPTH];
2815    |      |             ^~~~~
2816    |      |             |
2817    |      |             (1) region created on stack here
2818    |......
2819    | 1603 |   if (yyss + yystacksize - 1 <= yyssp)
2820    |      |      ~       
2821    |      |      |
2822    |      |      (2) following 'false' branch...
2823    |......
2824    | 1666 |   if (yystate == YYFINAL)
2825    |      |      ~       
2826    |      |      |
2827    |      |      (3) ...to here
2828    |      |      (4) following 'false' branch (when 'yystate != 3')...
2829    |......
2830    | 1669 |   goto yybackup;
2831    |      |   ~~~~       
2832    |      |   |
2833    |      |   (5) ...to here
2834    |......
2835    | 1681 |   if (yypact_value_is_default (yyn))
2836    |      |      ~       
2837    |      |      |
2838    |      |      (6) following 'true' branch (when 'yyn == -16')...
2839    | 1682 |     goto yydefault;
2840    |      |     ~~~~     
2841    |      |     |
2842    |      |     (7) ...to here
2843    |......
2844    | 1749 |   if (yyn == 0)
2845    |      |      ~       
2846    |      |      |
2847    |      |      (8) following 'false' branch (when 'yyn != 0')...
2848    | 1750 |     goto yyerrlab;
2849    | 1751 |   goto yyreduce;
2850    |      |   ~~~~       
2851    |      |   |
2852    |      |   (9) ...to here
2853    |......
2854    | 1769 |   yyval = yyvsp[1-yylen];
2855    |      |   ~~~~~~~~~~~~~~~~~~~~~~
2856    |      |         |
2857    |      |         (10) use of uninitialized value '*<unknown>' here
2858    |
2859turtle_parser.c:1769:9: warning: use of uninitialized value '*<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
2860 1769 |   yyval = yyvsp[1-yylen];
2861      |   ~~~~~~^~~~~~~~~~~~~~~~
2862  'turtle_parse': events 1-6
2863    |
2864    |./turtle_parser.y:1410:1:
2865    | 1410 | turtle_parse(raptor_parser *rdf_parser, const char *string, size_t length)
2866    |      | ^~~~~~~~~~~~
2867    |      | |
2868    |      | (1) entry to 'turtle_parse'
2869    |......
2870    | 1415 |   if(!string || !*string)
2871    |      |     ~
2872    |      |     |
2873    |      |     (2) following 'false' branch...
2874    |......
2875    | 1418 |   if(turtle_lexer_lex_init(&turtle_parser->scanner))
2876    |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2877    |      |     ||
2878    |      |     |(3) ...to here
2879    |      |     (4) following 'false' branch...
2880    | 1419 |     return 1;
2881    | 1420 |   turtle_parser->scanner_set = 1;
2882    |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2883    |      |                              |
2884    |      |                              (5) ...to here
2885    |......
2886    | 1430 |   rc = turtle_parser_parse(rdf_parser, turtle_parser->scanner);
2887    |      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2888    |      |        |
2889    |      |        (6) calling 'turtle_parser_parse' from 'turtle_parse'
2890    |
2891    +--> 'turtle_parser_parse': event 7
2892           |
2893           |turtle_parser.c:69:25:
2894           |   69 | #define yyparse         turtle_parser_parse
2895           |      |                         ^~~~~~~~~~~~~~~~~~~
2896           |      |                         |
2897           |      |                         (7) entry to 'turtle_parser_parse'
2898turtle_parser.c:1509:1: note: in expansion of macro 'yyparse'
2899           | 1509 | yyparse (raptor_parser* rdf_parser, void* yyscanner)
2900           |      | ^~~~~~~
2901           |
2902         'turtle_parser_parse': events 8-17
2903           |
2904           | 1544 |     YYSTYPE yyvsa[YYINITDEPTH];
2905           |      |             ^~~~~
2906           |      |             |
2907           |      |             (8) region created on stack here
2908           |......
2909           | 1603 |   if (yyss + yystacksize - 1 <= yyssp)
2910           |      |      ~       
2911           |      |      |
2912           |      |      (9) following 'false' branch...
2913           |......
2914           | 1666 |   if (yystate == YYFINAL)
2915           |      |      ~       
2916           |      |      |
2917           |      |      (10) ...to here
2918           |      |      (11) following 'false' branch (when 'yystate != 3')...
2919           |......
2920           | 1669 |   goto yybackup;
2921           |      |   ~~~~       
2922           |      |   |
2923           |      |   (12) ...to here
2924           |......
2925           | 1681 |   if (yypact_value_is_default (yyn))
2926           |      |      ~       
2927           |      |      |
2928           |      |      (13) following 'true' branch (when 'yyn == -16')...
2929           | 1682 |     goto yydefault;
2930           |      |     ~~~~     
2931           |      |     |
2932           |      |     (14) ...to here
2933           |......
2934           | 1749 |   if (yyn == 0)
2935           |      |      ~       
2936           |      |      |
2937           |      |      (15) following 'false' branch (when 'yyn != 0')...
2938           | 1750 |     goto yyerrlab;
2939           | 1751 |   goto yyreduce;
2940           |      |   ~~~~       
2941           |      |   |
2942           |      |   (16) ...to here
2943           |......
2944           | 1769 |   yyval = yyvsp[1-yylen];
2945           |      |   ~~~~~~~~~~~~~~~~~~~~~~
2946           |      |         |
2947           |      |         (17) use of uninitialized value '*<unknown>' here
2948           |
2949turtle_parser.c:1769:9: warning: use of uninitialized value '*<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
2950 1769 |   yyval = yyvsp[1-yylen];
2951      |   ~~~~~~^~~~~~~~~~~~~~~~
2952  'raptor_turtle_parse_chunk': events 1-4
2953    |
2954    |./turtle_parser.y:1670:1:
2955    | 1670 | raptor_turtle_parse_chunk(raptor_parser* rdf_parser,
2956    |      | ^~~~~~~~~~~~~~~~~~~~~~~~~
2957    |      | |
2958    |      | (1) entry to 'raptor_turtle_parse_chunk'
2959    |......
2960    | 1707 |   if(is_end && !turtle_parser->end_of_buffer) {
2961    |      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2962    |      |             |
2963    |      |             (2) following 'false' branch...
2964    |......
2965    | 1713 |   ptr = turtle_parser->buffer + turtle_parser->consumed;
2966    |      |         ~~~~~~~~~~~~~~~~~~~~~
2967    |      |                      |
2968    |      |                      (3) ...to here
2969    |......
2970    | 1750 |   rc = turtle_parse(rdf_parser, turtle_parser->buffer, turtle_parser->consumable);
2971    |      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2972    |      |        |
2973    |      |        (4) calling 'turtle_parse' from 'raptor_turtle_parse_chunk'
2974    |
2975    +--> 'turtle_parse': events 5-10
2976           |
2977           | 1410 | turtle_parse(raptor_parser *rdf_parser, const char *string, size_t length)
2978           |      | ^~~~~~~~~~~~
2979           |      | |
2980           |      | (5) entry to 'turtle_parse'
2981           |......
2982           | 1415 |   if(!string || !*string)
2983           |      |     ~
2984           |      |     |
2985           |      |     (6) following 'false' branch...
2986           |......
2987           | 1418 |   if(turtle_lexer_lex_init(&turtle_parser->scanner))
2988           |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2989           |      |     ||
2990           |      |     |(7) ...to here
2991           |      |     (8) following 'false' branch...
2992           | 1419 |     return 1;
2993           | 1420 |   turtle_parser->scanner_set = 1;
2994           |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2995           |      |                              |
2996           |      |                              (9) ...to here
2997           |......
2998           | 1430 |   rc = turtle_parser_parse(rdf_parser, turtle_parser->scanner);
2999           |      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3000           |      |        |
3001           |      |        (10) calling 'turtle_parser_parse' from 'turtle_parse'
3002           |
3003           +--> 'turtle_parser_parse': event 11
3004                  |
3005                  |turtle_parser.c:69:25:
3006                  |   69 | #define yyparse         turtle_parser_parse
3007                  |      |                         ^~~~~~~~~~~~~~~~~~~
3008                  |      |                         |
3009                  |      |                         (11) entry to 'turtle_parser_parse'
3010turtle_parser.c:1509:1: note: in expansion of macro 'yyparse'
3011                  | 1509 | yyparse (raptor_parser* rdf_parser, void* yyscanner)
3012                  |      | ^~~~~~~
3013                  |
3014                'turtle_parser_parse': events 12-21
3015                  |
3016                  | 1544 |     YYSTYPE yyvsa[YYINITDEPTH];
3017                  |      |             ^~~~~
3018                  |      |             |
3019                  |      |             (12) region created on stack here
3020                  |......
3021                  | 1603 |   if (yyss + yystacksize - 1 <= yyssp)
3022                  |      |      ~       
3023                  |      |      |
3024                  |      |      (13) following 'false' branch...
3025                  |......
3026                  | 1666 |   if (yystate == YYFINAL)
3027                  |      |      ~       
3028                  |      |      |
3029                  |      |      (14) ...to here
3030                  |      |      (15) following 'false' branch (when 'yystate != 3')...
3031                  |......
3032                  | 1669 |   goto yybackup;
3033                  |      |   ~~~~       
3034                  |      |   |
3035                  |      |   (16) ...to here
3036                  |......
3037                  | 1681 |   if (yypact_value_is_default (yyn))
3038                  |      |      ~       
3039                  |      |      |
3040                  |      |      (17) following 'true' branch (when 'yyn == -16')...
3041                  | 1682 |     goto yydefault;
3042                  |      |     ~~~~     
3043                  |      |     |
3044                  |      |     (18) ...to here
3045                  |......
3046                  | 1749 |   if (yyn == 0)
3047                  |      |      ~       
3048                  |      |      |
3049                  |      |      (19) following 'false' branch (when 'yyn != 0')...
3050                  | 1750 |     goto yyerrlab;
3051                  | 1751 |   goto yyreduce;
3052                  |      |   ~~~~       
3053                  |      |   |
3054                  |      |   (20) ...to here
3055                  |......
3056                  | 1769 |   yyval = yyvsp[1-yylen];
3057                  |      |   ~~~~~~~~~~~~~~~~~~~~~~
3058                  |      |         |
3059                  |      |         (21) use of uninitialized value '*<unknown>' here
3060                  |
3061raptor_grddl.c: In function 'raptor_new_xml_context':
3062raptor_grddl.c:230:20: warning: dereference of possibly-NULL 'xml_context' [CWE-690] [-Wanalyzer-possible-null-dereference]
3063  230 |   xml_context->uri = uri;
3064      |   ~~~~~~~~~~~~~~~~~^~~~~
3065  'raptor_grddl_parse_chunk': events 1-20
3066    |
3067    | 1374 | raptor_grddl_parse_chunk(raptor_parser* rdf_parser,
3068    |      | ^~~~~~~~~~~~~~~~~~~~~~~~
3069    |      | |
3070    |      | (1) entry to 'raptor_grddl_parse_chunk'
3071    |......
3072    | 1422 |   if(!is_end)
3073    |      |     ~
3074    |      |     |
3075    |      |     (2) following 'false' branch (when 'is_end != 0')...
3076    |......
3077    | 1425 |   buffer_len = raptor_stringbuffer_length(grddl_parser->sb);
3078    |      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3079    |      |                |
3080    |      |                (3) ...to here
3081    |......
3082    | 1440 |   for(loop = 0; loop < 2; loop++) {
3083    |      |                 ~~~~~~~~
3084    |      |                      |
3085    |      |                      (4) following 'true' branch (when 'loop <= 1')...
3086    |......
3087    | 1443 |     if(loop == 0) {
3088    |      |       ~
3089    |      |       |
3090    |      |       (5) ...to here
3091    |      |       (6) following 'true' branch (when 'loop == 0')...
3092    | 1444 |       int libxml_options = 0;
3093    |      |           ~~~~~~~~~~~~~~
3094    |      |           |
3095    |      |           (7) ...to here
3096    |......
3097    | 1551 |     if(!rc)
3098    |      |       ~
3099    |      |       |
3100    |      |       (8) following 'true' branch (when 'rc == 0')...
3101    | 1552 |       break;
3102    |      |       ~~~~~
3103    |      |       |
3104    |      |       (9) ...to here
3105    |......
3106    | 1571 |   if(!doc) {
3107    |      |     ~
3108    |      |     |
3109    |      |     (10) following 'false' branch (when 'doc' is non-NULL)...
3110    |......
3111    | 1578 |   if(!grddl_parser->grddl_processing)
3112    |      |     ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3113    |      |     |             |
3114    |      |     |             (11) ...to here
3115    |      |     (12) following 'false' branch...
3116    |......
3117    | 1582 |   if(grddl_parser->xinclude_processing) {
3118    |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3119    |      |     |            |
3120    |      |     |            (13) ...to here
3121    |      |     (14) following 'false' branch...
3122    |......
3123    | 1614 |     xmlNsPtr rootNs = NULL;
3124    |      |              ~~~~~~
3125    |      |              |
3126    |      |              (15) ...to here
3127    |......
3128    | 1624 |     if(ns_uri_string) {
3129    |      |       ~
3130    |      |       |
3131    |      |       (16) following 'false' branch (when 'ns_uri_string' is NULL)...
3132    |......
3133    | 1675 |   if(!grddl_parser->root_ns_uri) {
3134    |      |     ~ ~~~~~~~~~~~~~~~~~~~~~~~~~
3135    |      |     |             |
3136    |      |     |             (17) ...to here
3137    |      |     (18) following 'true' branch...
3138    | 1676 |     grddl_xml_context* xml_context;
3139    | 1677 |     xml_context = raptor_new_xml_context(rdf_parser->world, NULL, NULL);
3140    |      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3141    |      |                   |
3142    |      |                   (19) ...to here
3143    |      |                   (20) calling 'raptor_new_xml_context' from 'raptor_grddl_parse_chunk'
3144    |
3145    +--> 'raptor_new_xml_context': event 21
3146           |
3147           |  220 | raptor_new_xml_context(raptor_world* world, raptor_uri* uri,
3148           |      | ^~~~~~~~~~~~~~~~~~~~~~
3149           |      | |
3150           |      | (21) entry to 'raptor_new_xml_context'
3151           |
3152         'raptor_new_xml_context': event 22
3153           |
3154           |raptor_internal.h:72:41:
3155           |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
3156           |      |                                         ^~~~~~~~~~~~
3157           |      |                                         |
3158           |      |                                         (22) this call could return NULL
3159raptor_grddl.c:225:17: note: in expansion of macro 'RAPTOR_MALLOC'
3160           |  225 |   xml_context = RAPTOR_MALLOC(grddl_xml_context*, sizeof(*xml_context));
3161           |      |                 ^~~~~~~~~~~~~
3162           |
3163         'raptor_new_xml_context': events 23-27
3164           |
3165           |  226 |   if(uri)
3166           |      |     ^
3167           |      |     |
3168           |      |     (23) following 'false' branch (when 'uri' is NULL)...
3169           |  227 |     uri = raptor_uri_copy(uri);
3170           |  228 |   if(base_uri)
3171           |      |     ~
3172           |      |     |
3173           |      |     (24) ...to here
3174           |      |     (25) following 'false' branch (when 'base_uri' is NULL)...
3175           |  229 |     base_uri = raptor_uri_copy(base_uri);
3176           |  230 |   xml_context->uri = uri;
3177           |      |   ~~~~~~~~~~~~~~~~~~~~~~
3178           |      |                    |
3179           |      |                    (26) ...to here
3180           |      |                    (27) 'xml_context' could be NULL: unchecked value from (22)
3181           |
3182raptor_grddl.c: In function 'raptor_grddl_run_grddl_transform_doc':
3183raptor_grddl.c:732:22: warning: dereference of possibly-NULL 'quoted_base_uri' [CWE-690] [-Wanalyzer-possible-null-dereference]
3184  732 |   quoted_base_uri[0] = '\'';
3185      |   ~~~~~~~~~~~~~~~~~~~^~~~~~
3186  'raptor_grddl_parse_chunk': events 1-14
3187    |
3188    | 1374 | raptor_grddl_parse_chunk(raptor_parser* rdf_parser,
3189    |      | ^~~~~~~~~~~~~~~~~~~~~~~~
3190    |      | |
3191    |      | (1) entry to 'raptor_grddl_parse_chunk'
3192    |......
3193    | 1422 |   if(!is_end)
3194    |      |     ~
3195    |      |     |
3196    |      |     (2) following 'false' branch (when 'is_end != 0')...
3197    |......
3198    | 1425 |   buffer_len = raptor_stringbuffer_length(grddl_parser->sb);
3199    |      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3200    |      |                |
3201    |      |                (3) ...to here
3202    |......
3203    | 1440 |   for(loop = 0; loop < 2; loop++) {
3204    |      |                 ~~~~~~~~
3205    |      |                      |
3206    |      |                      (4) following 'true' branch (when 'loop <= 1')...
3207    |......
3208    | 1443 |     if(loop == 0) {
3209    |      |       ~
3210    |      |       |
3211    |      |       (5) ...to here
3212    |      |       (6) following 'true' branch (when 'loop == 0')...
3213    | 1444 |       int libxml_options = 0;
3214    |      |           ~~~~~~~~~~~~~~
3215    |      |           |
3216    |      |           (7) ...to here
3217    |......
3218    | 1551 |     if(!rc)
3219    |      |       ~
3220    |      |       |
3221    |      |       (8) following 'true' branch (when 'rc == 0')...
3222    | 1552 |       break;
3223    |      |       ~~~~~
3224    |      |       |
3225    |      |       (9) ...to here
3226    |......
3227    | 1571 |   if(!doc) {
3228    |      |     ~
3229    |      |     |
3230    |      |     (10) following 'false' branch (when 'doc' is non-NULL)...
3231    |......
3232    | 1578 |   if(!grddl_parser->grddl_processing)
3233    |      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3234    |      |                   |
3235    |      |                   (11) ...to here
3236    |......
3237    | 1882 |   while(raptor_sequence_size(grddl_parser->doc_transform_uris)) {
3238    |      |         ~~~~~~~~~~~~~~~~~~~~
3239    |      |         |
3240    |      |         (12) following 'true' branch...
3241    |......
3242    | 1885 |     xml_context = (grddl_xml_context*)raptor_sequence_unshift(grddl_parser->doc_transform_uris);
3243    |      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3244    |      |                                       |
3245    |      |                                       (13) ...to here
3246    | 1886 |     ret = raptor_grddl_run_grddl_transform_uri(rdf_parser, xml_context, doc);
3247    |      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3248    |      |           |
3249    |      |           (14) calling 'raptor_grddl_run_grddl_transform_uri' from 'raptor_grddl_parse_chunk'
3250    |
3251    +--> 'raptor_grddl_run_grddl_transform_uri': events 15-16
3252           |
3253           |  977 | raptor_grddl_run_grddl_transform_uri(raptor_parser* rdf_parser,
3254           |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3255           |      | |
3256           |      | (15) entry to 'raptor_grddl_run_grddl_transform_uri'
3257           |......
3258           | 1005 |   ret = raptor_grddl_fetch_uri(rdf_parser,
3259           |      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3260           |      |         |
3261           |      |         (16) calling 'raptor_grddl_fetch_uri' from 'raptor_grddl_run_grddl_transform_uri'
3262           | 1006 |                              xslt_uri,
3263           |      |                              ~~~~~~~~~
3264           | 1007 |                              raptor_grddl_uri_xml_parse_bytes, &xpbc,
3265           |      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3266           | 1008 |                              NULL, NULL,
3267           |      |                              ~~~~~~~~~~~
3268           | 1009 |                              FETCH_ACCEPT_XSLT);
3269           |      |                              ~~~~~~~~~~~~~~~~~~
3270           |
3271           +--> 'raptor_grddl_fetch_uri': events 17-20
3272                  |
3273                  |  907 | raptor_grddl_fetch_uri(raptor_parser* rdf_parser,
3274                  |      | ^~~~~~~~~~~~~~~~~~~~~~
3275                  |      | |
3276                  |      | (17) entry to 'raptor_grddl_fetch_uri'
3277                  |......
3278                  |  926 |   if(!www)
3279                  |      |     ~
3280                  |      |     |
3281                  |      |     (18) following 'false' branch (when 'www' is non-NULL)...
3282                  |......
3283                  |  929 |   if(raptor_www_set_user_agent2(www, "grddl/0.1", 0))
3284                  |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3285                  |      |     ||
3286                  |      |     |(19) ...to here
3287                  |      |     (20) following 'false' branch...
3288                  |
3289                'raptor_grddl_fetch_uri': events 21-29
3290                  |
3291                  |  932 |   if(flags & FETCH_ACCEPT_XSLT) {
3292                  |      |     ~      ^
3293                  |      |     |      |
3294                  |      |     |      (21) ...to here
3295                  |      |     (22) following 'true' branch...
3296                  |  933 |     if(raptor_www_set_http_accept2(www, "application/xml", 0))
3297                  |      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3298                  |      |       ||
3299                  |      |       |(23) ...to here
3300                  |      |       (24) following 'false' branch...
3301                  |......
3302                  |  944 |   if(rdf_parser->uri_filter)
3303                  |      |      ~~~~~~~~~~~~~~~~~~~~~~
3304                  |      |                |
3305                  |      |                (25) ...to here
3306                  |......
3307                  |  947 |   if(ignore_errors)
3308                  |      |     ~       
3309                  |      |     |
3310                  |      |     (26) following 'false' branch (when 'ignore_errors == 0')...
3311                  |......
3312                  |  950 |   raptor_www_set_write_bytes_handler(www, write_bytes_handler,
3313                  |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3314                  |      |   |
3315                  |      |   (27) ...to here
3316                  |  951 |                                      write_bytes_user_data);
3317                  |      |                                      ~~~~~~~~~~~~~~~~~~~~~~
3318                  |......
3319                  |  963 |   if(ignore_errors)
3320                  |      |     ~       
3321                  |      |     |
3322                  |      |     (28) following 'false' branch (when 'ignore_errors == 0')...
3323                  |......
3324                  |  966 |   return ret;
3325                  |      |          ~~~
3326                  |      |          |
3327                  |      |          (29) ...to here
3328                  |
3329           <------+
3330           |
3331         'raptor_grddl_run_grddl_transform_uri': events 30-33
3332           |
3333           | 1005 |   ret = raptor_grddl_fetch_uri(rdf_parser,
3334           |      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3335           |      |         |
3336           |      |         (30) returning to 'raptor_grddl_run_grddl_transform_uri' from 'raptor_grddl_fetch_uri'
3337           | 1006 |                              xslt_uri,
3338           |      |                              ~~~~~~~~~
3339           | 1007 |                              raptor_grddl_uri_xml_parse_bytes, &xpbc,
3340           |      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3341           | 1008 |                              NULL, NULL,
3342           |      |                              ~~~~~~~~~~~
3343           | 1009 |                              FETCH_ACCEPT_XSLT);
3344           |      |                              ~~~~~~~~~~~~~~~~~~
3345           | 1010 |   xslt_ctxt = xpbc.xc;
3346           | 1011 |   if(ret) {
3347           |      |     ~   
3348           |      |     |
3349           |      |     (31) following 'false' branch (when 'ret == 0')...
3350           |......
3351           | 1017 |     xmlParseChunk(xpbc.xc, NULL, 0, 1);
3352           |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3353           |      |     |
3354           |      |     (32) ...to here
3355           | 1018 |
3356           | 1019 |     ret = raptor_grddl_run_grddl_transform_doc(rdf_parser,
3357           |      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3358           |      |           |
3359           |      |           (33) calling 'raptor_grddl_run_grddl_transform_doc' from 'raptor_grddl_run_grddl_transform_uri'
3360           | 1020 |                                                xml_context,
3361           |      |                                                ~~~~~~~~~~~~
3362           | 1021 |                                                xslt_ctxt->myDoc,
3363           |      |                                                ~~~~~~~~~~~~~~~~~
3364           | 1022 |                                                doc);
3365           |      |                                                ~~~~
3366           |
3367           +--> 'raptor_grddl_run_grddl_transform_doc': events 34-36
3368                  |
3369                  |  666 | raptor_grddl_run_grddl_transform_doc(raptor_parser* rdf_parser,
3370                  |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3371                  |      | |
3372                  |      | (34) entry to 'raptor_grddl_run_grddl_transform_doc'
3373                  |......
3374                  |  702 |   if(!sheet) {
3375                  |      |     ~
3376                  |      |     |
3377                  |      |     (35) following 'false' branch (when 'sheet' is non-NULL)...
3378                  |......
3379                  |  710 |   userCtxt = xsltNewTransformContext(sheet, doc);
3380                  |      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3381                  |      |              |
3382                  |      |              (36) ...to here
3383                  |
3384                'raptor_grddl_run_grddl_transform_doc': event 37
3385                  |
3386                  |raptor_internal.h:72:41:
3387                  |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
3388                  |      |                                         ^~~~~~~~~~~~
3389                  |      |                                         |
3390                  |      |                                         (37) this call could return NULL
3391raptor_grddl.c:731:21: note: in expansion of macro 'RAPTOR_MALLOC'
3392                  |  731 |   quoted_base_uri = RAPTOR_MALLOC(char*, base_uri_len + 3);
3393                  |      |                     ^~~~~~~~~~~~~
3394                  |
3395                'raptor_grddl_run_grddl_transform_doc': event 38
3396                  |
3397                  |  732 |   quoted_base_uri[0] = '\'';
3398                  |      |   ~~~~~~~~~~~~~~~~~~~^~~~~~
3399                  |      |                      |
3400                  |      |                      (38) 'quoted_base_uri' could be NULL: unchecked value from (37)
3401                  |
3402In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
3403                 from raptor_grddl.c:39:
3404raptor_grddl.c: In function 'raptor_grddl_run_xpath_match':
3405/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17: warning: use of possibly-NULL 'buffer' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
3406   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
3407      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3408raptor_grddl.c:1173:7: note: in expansion of macro 'memcpy'
3409 1173 |       memcpy(buffer, uri_string, list_len + 1);
3410      |       ^~~~~~
3411  'raptor_grddl_parse_chunk': events 1-22
3412    |
3413    | 1374 | raptor_grddl_parse_chunk(raptor_parser* rdf_parser,
3414    |      | ^~~~~~~~~~~~~~~~~~~~~~~~
3415    |      | |
3416    |      | (1) entry to 'raptor_grddl_parse_chunk'
3417    |......
3418    | 1422 |   if(!is_end)
3419    |      |     ~
3420    |      |     |
3421    |      |     (2) following 'false' branch (when 'is_end != 0')...
3422    |......
3423    | 1425 |   buffer_len = raptor_stringbuffer_length(grddl_parser->sb);
3424    |      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3425    |      |                |
3426    |      |                (3) ...to here
3427    |......
3428    | 1440 |   for(loop = 0; loop < 2; loop++) {
3429    |      |                 ~~~~~~~~
3430    |      |                      |
3431    |      |                      (4) following 'true' branch (when 'loop <= 1')...
3432    |......
3433    | 1443 |     if(loop == 0) {
3434    |      |       ~
3435    |      |       |
3436    |      |       (5) ...to here
3437    |      |       (6) following 'true' branch (when 'loop == 0')...
3438    | 1444 |       int libxml_options = 0;
3439    |      |           ~~~~~~~~~~~~~~
3440    |      |           |
3441    |      |           (7) ...to here
3442    |......
3443    | 1551 |     if(!rc)
3444    |      |       ~
3445    |      |       |
3446    |      |       (8) following 'true' branch (when 'rc == 0')...
3447    | 1552 |       break;
3448    |      |       ~~~~~
3449    |      |       |
3450    |      |       (9) ...to here
3451    |......
3452    | 1571 |   if(!doc) {
3453    |      |     ~
3454    |      |     |
3455    |      |     (10) following 'false' branch (when 'doc' is non-NULL)...
3456    |......
3457    | 1578 |   if(!grddl_parser->grddl_processing)
3458    |      |     ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3459    |      |     |             |
3460    |      |     |             (11) ...to here
3461    |      |     (12) following 'false' branch...
3462    |......
3463    | 1582 |   if(grddl_parser->xinclude_processing) {
3464    |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3465    |      |     |            |
3466    |      |     |            (13) ...to here
3467    |      |     (14) following 'false' branch...
3468    |......
3469    | 1614 |     xmlNsPtr rootNs = NULL;
3470    |      |              ~~~~~~
3471    |      |              |
3472    |      |              (15) ...to here
3473    |......
3474    | 1624 |     if(ns_uri_string) {
3475    |      |       ~
3476    |      |       |
3477    |      |       (16) following 'false' branch (when 'ns_uri_string' is NULL)...
3478    |......
3479    | 1675 |   if(!grddl_parser->root_ns_uri) {
3480    |      |     ~ ~~~~~~~~~~~~~~~~~~~~~~~~~
3481    |      |     |             |
3482    |      |     |             (17) ...to here
3483    |      |     (18) following 'false' branch...
3484    |......
3485    | 1683 |   if(!grddl_parser->xpathCtx) {
3486    |      |     ~ ~~~~~~~~~~~~~~~~~~~~~~
3487    |      |     |             |
3488    |      |     |             (19) ...to here
3489    |      |     (20) following 'false' branch...
3490    |......
3491    | 1703 |     result = raptor_grddl_run_xpath_match(rdf_parser, doc,
3492    |      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3493    |      |              |
3494    |      |              (21) ...to here
3495    |      |              (22) calling 'raptor_grddl_run_xpath_match' from 'raptor_grddl_parse_chunk'
3496    | 1704 |                                         (const xmlChar*)"/html:html/html:head/@profile",
3497    |      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3498    | 1705 |                                         MATCH_IS_VALUE_LIST | MATCH_IS_PROFILE);
3499    |      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3500    |
3501    +--> 'raptor_grddl_run_xpath_match': events 23-26
3502           |
3503           | 1075 | raptor_grddl_run_xpath_match(raptor_parser* rdf_parser,
3504           |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
3505           |      | |
3506           |      | (23) entry to 'raptor_grddl_run_xpath_match'
3507           |......
3508           | 1095 |   if(!xpathObj) {
3509           |      |     ~
3510           |      |     |
3511           |      |     (24) following 'false' branch (when 'xpathObj' is non-NULL)...
3512           |......
3513           | 1103 |   nodes = xpathObj->nodesetval;
3514           |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3515           |      |         |
3516           |      |         (25) ...to here
3517           | 1104 |   if(!nodes || xmlXPathNodeSetIsEmpty(nodes)) {
3518           |      |     ~
3519           |      |     |
3520           |      |     (26) following 'false' branch...
3521           |
3522         'raptor_grddl_run_xpath_match': event 27
3523           |
3524           |/Users/ericgallager/miniconda3/include/libxml2/libxml/xpath.h:429:59:
3525           |  429 | #define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
3526           |      |                                      ~~~~~~~~~~~~~~~~~~~~~^~~~
3527           |      |                                                           |
3528           |      |                                                           (27) ...to here
3529raptor_grddl.c:1118:10: note: in expansion of macro 'xmlXPathNodeSetGetLength'
3530           | 1118 |   size = xmlXPathNodeSetGetLength(nodes);
3531           |      |          ^~~~~~~~~~~~~~~~~~~~~~~~
3532           |
3533         'raptor_grddl_run_xpath_match': event 28
3534           |
3535           |/Users/ericgallager/miniconda3/include/libxml2/libxml/xpath.h:429:59:
3536           |  429 | #define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
3537           |      |                                      ~~~~~~~~~~~~~~~~~~~~~^~~~
3538           |      |                                                           |
3539           |      |                                                           (28) following 'true' branch (when 'nodes' is non-NULL)...
3540raptor_grddl.c:1118:10: note: in expansion of macro 'xmlXPathNodeSetGetLength'
3541           | 1118 |   size = xmlXPathNodeSetGetLength(nodes);
3542           |      |          ^~~~~~~~~~~~~~~~~~~~~~~~
3543           |
3544         'raptor_grddl_run_xpath_match': event 29
3545           |
3546           |/Users/ericgallager/miniconda3/include/libxml2/libxml/xpath.h:429:59:
3547           |  429 | #define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
3548           |      |                                      ~~~~~~~~~~~~~~~~~~~~~^~~~
3549           |      |                                                           |
3550           |      |                                                           (29) ...to here
3551raptor_grddl.c:1118:10: note: in expansion of macro 'xmlXPathNodeSetGetLength'
3552           | 1118 |   size = xmlXPathNodeSetGetLength(nodes);
3553           |      |          ^~~~~~~~~~~~~~~~~~~~~~~~
3554           |
3555         'raptor_grddl_run_xpath_match': events 30-35
3556           |
3557           | 1119 |   for(i = 0; i < size; i++) {
3558           |      |              ~~^~~~~~
3559           |      |                |
3560           |      |                (30) following 'true' branch (when 'i < size')...
3561           | 1120 |     xmlNodePtr node = nodes->nodeTab[i];
3562           |      |                       ~~~~~~~~~~~~~~
3563           |      |                            |
3564           |      |                            (31) ...to here
3565           |......
3566           | 1154 |     if(base_uri_string) {
3567           |      |       ~         
3568           |      |       |
3569           |      |       (32) following 'true' branch (when 'base_uri_string' is non-NULL)...
3570           | 1155 |       base_uri = raptor_new_uri(rdf_parser->world, base_uri_string);
3571           |      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3572           |      |                  |
3573           |      |                  (33) ...to here
3574           |......
3575           | 1166 |     if(uri_string && (flags & MATCH_IS_VALUE_LIST)) {
3576           |      |       ~         
3577           |      |       |
3578           |      |       (34) following 'true' branch...
3579           |......
3580           | 1170 |       size_t list_len = strlen((const char*)uri_string);
3581           |      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3582           |      |                         |
3583           |      |                         (35) ...to here
3584           |
3585         'raptor_grddl_run_xpath_match': event 36
3586           |
3587           |raptor_internal.h:72:41:
3588           |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
3589           |      |                                         ^~~~~~~~~~~~
3590           |      |                                         |
3591           |      |                                         (36) this call could return NULL
3592raptor_grddl.c:1172:16: note: in expansion of macro 'RAPTOR_MALLOC'
3593           | 1172 |       buffer = RAPTOR_MALLOC(char*, list_len + 1);
3594           |      |                ^~~~~~~~~~~~~
3595           |
3596         'raptor_grddl_run_xpath_match': event 37
3597           |
3598           |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
3599           |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
3600           |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3601           |      |                 |
3602           |      |                 (37) argument 1 ('buffer') from (36) could be NULL where non-null expected
3603raptor_grddl.c:1173:7: note: in expansion of macro 'memcpy'
3604           | 1173 |       memcpy(buffer, uri_string, list_len + 1);
3605           |      |       ^~~~~~
3606           |
3607<built-in>: note: argument 1 of '__builtin___memcpy_chk' must be non-null
3608raptor_grddl.c: In function 'raptor_grddl_parse_content_type_handler':
3609/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17: warning: use of possibly-NULL '*grddl_parser.content_type' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
3610   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
3611      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3612raptor_grddl.c:1977:5: note: in expansion of macro 'memcpy'
3613 1977 |     memcpy(grddl_parser->content_type, content_type, len + 1);
3614      |     ^~~~~~
3615  'raptor_grddl_parse_content_type_handler': events 1-2
3616    |
3617    | 1971 |   if(content_type) {
3618    |      |     ^
3619    |      |     |
3620    |      |     (1) following 'true' branch (when 'content_type' is non-NULL)...
3621    | 1972 |     size_t len = strlen(content_type) + 1;
3622    |      |                  ~~~~~~~~~~~~~~~~~~~~
3623    |      |                  |
3624    |      |                  (2) ...to here
3625    |
3626  'raptor_grddl_parse_content_type_handler': event 3
3627    |
3628    |raptor_internal.h:72:41:
3629    |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
3630    |      |                                         ^~~~~~~~~~~~
3631    |      |                                         |
3632    |      |                                         (3) this call could return NULL
3633raptor_grddl.c:1976:34: note: in expansion of macro 'RAPTOR_MALLOC'
3634    | 1976 |     grddl_parser->content_type = RAPTOR_MALLOC(char*, len + 1);
3635    |      |                                  ^~~~~~~~~~~~~
3636    |
3637  'raptor_grddl_parse_content_type_handler': event 4
3638    |
3639    |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
3640    |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
3641    |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3642    |      |                 |
3643    |      |                 (4) argument 1 ('*grddl_parser.content_type') from (3) could be NULL where non-null expected
3644raptor_grddl.c:1977:5: note: in expansion of macro 'memcpy'
3645    | 1977 |     memcpy(grddl_parser->content_type, content_type, len + 1);
3646    |      |     ^~~~~~
3647    |
3648<built-in>: note: argument 1 of '__builtin___memcpy_chk' must be non-null
3649In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
3650                 from raptor_guess.c:29:
3651raptor_guess.c: In function 'raptor_guess_parse_content_type_handler':
3652/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17: warning: use of possibly-NULL '*guess_parser.content_type' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
3653   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
3654      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3655raptor_guess.c:106:5: note: in expansion of macro 'memcpy'
3656  106 |     memcpy(guess_parser->content_type, content_type, len);
3657      |     ^~~~~~
3658  'raptor_guess_parse_content_type_handler': events 1-5
3659    |
3660    |   96 |   if(content_type) {
3661    |      |     ^
3662    |      |     |
3663    |      |     (1) following 'true' branch (when 'content_type' is non-NULL)...
3664    |......
3665    |  100 |     if((p = strchr(content_type,';')))
3666    |      |       ~     ~~~~~~~~~~~~~~~~~~~~~~~~
3667    |      |       |     |
3668    |      |       |     (2) ...to here
3669    |      |       |     (3) when 'strchr' returns non-NULL
3670    |      |       (4) following 'true' branch (when 'p' is non-NULL)...
3671    |  101 |       len = p-content_type;
3672    |      |             ~~~~~~~~~~~~~~
3673    |      |              |
3674    |      |              (5) ...to here
3675    |
3676  'raptor_guess_parse_content_type_handler': event 6
3677    |
3678    |raptor_internal.h:72:41:
3679    |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
3680    |      |                                         ^~~~~~~~~~~~
3681    |      |                                         |
3682    |      |                                         (6) this call could return NULL
3683raptor_guess.c:105:34: note: in expansion of macro 'RAPTOR_MALLOC'
3684    |  105 |     guess_parser->content_type = RAPTOR_MALLOC(char*, len + 1);
3685    |      |                                  ^~~~~~~~~~~~~
3686    |
3687  'raptor_guess_parse_content_type_handler': event 7
3688    |
3689    |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
3690    |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
3691    |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3692    |      |                 |
3693    |      |                 (7) argument 1 ('*guess_parser.content_type') from (6) could be NULL where non-null expected
3694raptor_guess.c:106:5: note: in expansion of macro 'memcpy'
3695    |  106 |     memcpy(guess_parser->content_type, content_type, len);
3696    |      |     ^~~~~~
3697    |
3698<built-in>: note: argument 1 of '__builtin___memcpy_chk' must be non-null
3699raptor_abbrev.c: In function 'raptor_free_abbrev_node':
3700raptor_abbrev.c:95:12: warning: use after 'free' of 'node' [CWE-416] [-Wanalyzer-use-after-free]
3701   95 |   if(--node->ref_count)
3702      |        ~~~~^~~~~~~~~~~
3703  'raptor_abbrev_subject_find': events 1-2
3704    |
3705    |  416 | raptor_abbrev_subject_find(raptor_avltree *subjects, raptor_term* node)
3706    |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
3707    |      | |
3708    |      | (1) entry to 'raptor_abbrev_subject_find'
3709    |......
3710    |  424 |   lookup_node = raptor_new_abbrev_node(node->world, node);
3711    |      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3712    |      |                 |
3713    |      |                 (2) calling 'raptor_new_abbrev_node' from 'raptor_abbrev_subject_find'
3714    |
3715    +--> 'raptor_new_abbrev_node': events 3-4
3716           |
3717           |   66 | raptor_new_abbrev_node(raptor_world* world, raptor_term *term)
3718           |      | ^~~~~~~~~~~~~~~~~~~~~~
3719           |      | |
3720           |      | (3) entry to 'raptor_new_abbrev_node'
3721           |......
3722           |   70 |   if(term->type == RAPTOR_TERM_TYPE_UNKNOWN)
3723           |      |     ~
3724           |      |     |
3725           |      |     (4) following 'false' branch...
3726           |
3727         'raptor_new_abbrev_node': event 5
3728           |
3729           |raptor_internal.h:73:48:
3730           |   73 | #define RAPTOR_CALLOC(type, nmemb, size) (type)calloc(nmemb, size)
3731           |      |                                                ^~~~~~~~~~~~~~~~~~~
3732           |      |                                                |
3733           |      |                                                (5) ...to here
3734raptor_abbrev.c:73:10: note: in expansion of macro 'RAPTOR_CALLOC'
3735           |   73 |   node = RAPTOR_CALLOC(raptor_abbrev_node*, 1, sizeof(*node));
3736           |      |          ^~~~~~~~~~~~~
3737           |
3738         'raptor_new_abbrev_node': event 6
3739           |
3740           |raptor_internal.h:73:48:
3741           |   73 | #define RAPTOR_CALLOC(type, nmemb, size) (type)calloc(nmemb, size)
3742           |      |                                                ^~~~~~~~~~~~~~~~~~~
3743           |      |                                                |
3744           |      |                                                (6) allocated here
3745raptor_abbrev.c:73:10: note: in expansion of macro 'RAPTOR_CALLOC'
3746           |   73 |   node = RAPTOR_CALLOC(raptor_abbrev_node*, 1, sizeof(*node));
3747           |      |          ^~~~~~~~~~~~~
3748           |
3749         'raptor_new_abbrev_node': events 7-9
3750           |
3751           |   74 |   if(node) {
3752           |      |     ^
3753           |      |     |
3754           |      |     (7) assuming 'node' is non-NULL
3755           |      |     (8) following 'true' branch (when 'node' is non-NULL)...
3756           |   75 |     node->world = world;
3757           |      |     ~~~~~~~~~~~~~~~~~~~
3758           |      |                 |
3759           |      |                 (9) ...to here
3760           |
3761    <------+
3762    |
3763  'raptor_abbrev_subject_find': events 10-13
3764    |
3765    |  424 |   lookup_node = raptor_new_abbrev_node(node->world, node);
3766    |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3767    |      |                 |
3768    |      |                 (10) returning to 'raptor_abbrev_subject_find' from 'raptor_new_abbrev_node'
3769    |  425 |   if(!lookup_node)
3770    |      |     ~           
3771    |      |     |
3772    |      |     (11) following 'false' branch (when 'lookup_node' is non-NULL)...
3773    |......
3774    |  428 |   lookup = raptor_new_abbrev_subject(lookup_node);
3775    |      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3776    |      |            |
3777    |      |            (12) ...to here
3778    |      |            (13) calling 'raptor_new_abbrev_subject' from 'raptor_abbrev_subject_find'
3779    |
3780    +--> 'raptor_new_abbrev_subject': events 14-18
3781           |
3782           |  256 | raptor_new_abbrev_subject(raptor_abbrev_node* node)
3783           |      | ^~~~~~~~~~~~~~~~~~~~~~~~~
3784           |      | |
3785           |      | (14) entry to 'raptor_new_abbrev_subject'
3786           |......
3787           |  269 |   if(subject) {
3788           |      |     ~
3789           |      |     |
3790           |      |     (15) following 'true' branch (when 'subject' is non-NULL)...
3791           |  270 |     subject->node = node;
3792           |      |     ~~~~~~~~~~~~~~~~~~~~
3793           |      |                   |
3794           |      |                   (16) ...to here
3795           |......
3796           |  291 |     if(!subject->properties || !subject->list_items) {
3797           |      |       ~
3798           |      |       |
3799           |      |       (17) following 'false' branch...
3800           |......
3801           |  298 |   return subject;
3802           |      |          ~~~~~~~
3803           |      |          |
3804           |      |          (18) ...to here
3805           |
3806    <------+
3807    |
3808  'raptor_abbrev_subject_find': events 19-22
3809    |
3810    |  428 |   lookup = raptor_new_abbrev_subject(lookup_node);
3811    |      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3812    |      |            |
3813    |      |            (19) returning to 'raptor_abbrev_subject_find' from 'raptor_new_abbrev_subject'
3814    |  429 |   if(!lookup) {
3815    |      |     ~       
3816    |      |     |
3817    |      |     (20) following 'false' branch (when 'lookup' is non-NULL)...
3818    |......
3819    |  434 |   rv_subject = (raptor_abbrev_subject*) raptor_avltree_search(subjects, lookup);
3820    |      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3821    |      |                                         |
3822    |      |                                         (21) ...to here
3823    |  435 |
3824    |  436 |   raptor_free_abbrev_subject(lookup);
3825    |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3826    |      |   |
3827    |      |   (22) calling 'raptor_free_abbrev_subject' from 'raptor_abbrev_subject_find'
3828    |
3829    +--> 'raptor_free_abbrev_subject': event 23
3830           |
3831           |  303 | raptor_free_abbrev_subject(raptor_abbrev_subject* subject)
3832           |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
3833           |      | |
3834           |      | (23) entry to 'raptor_free_abbrev_subject'
3835           |
3836         'raptor_free_abbrev_subject': event 24
3837           |
3838           |raptor_internal.h:156:5:
3839           |  156 |   if(!pointer) { \
3840           |      |     ^
3841           |      |     |
3842           |      |     (24) following 'false' branch (when 'subject' is non-NULL)...
3843raptor_abbrev.c:305:3: note: in expansion of macro 'RAPTOR_ASSERT_OBJECT_POINTER_RETURN'
3844           |  305 |   RAPTOR_ASSERT_OBJECT_POINTER_RETURN(subject, raptor_abbrev_subject);
3845           |      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3846           |
3847         'raptor_free_abbrev_subject': events 25-28
3848           |
3849           |  307 |   if(subject->node)
3850           |      |     ~~~~~~~~^~~~~~
3851           |      |     |       |
3852           |      |     |       (25) ...to here
3853           |      |     (26) following 'true' branch...
3854           |  308 |     raptor_free_abbrev_node(subject->node);
3855           |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3856           |      |     |
3857           |      |     (27) ...to here
3858           |      |     (28) calling 'raptor_free_abbrev_node' from 'raptor_free_abbrev_subject'
3859           |
3860           +--> 'raptor_free_abbrev_node': event 29
3861                  |
3862                  |   91 | raptor_free_abbrev_node(raptor_abbrev_node* node)
3863                  |      | ^~~~~~~~~~~~~~~~~~~~~~~
3864                  |      | |
3865                  |      | (29) entry to 'raptor_free_abbrev_node'
3866                  |
3867                'raptor_free_abbrev_node': event 30
3868                  |
3869                  |raptor_internal.h:156:5:
3870                  |  156 |   if(!pointer) { \
3871                  |      |     ^
3872                  |      |     |
3873                  |      |     (30) following 'false' branch (when 'node' is non-NULL)...
3874raptor_abbrev.c:93:3: note: in expansion of macro 'RAPTOR_ASSERT_OBJECT_POINTER_RETURN'
3875                  |   93 |   RAPTOR_ASSERT_OBJECT_POINTER_RETURN(node, raptor_abbrev_node);
3876                  |      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3877                  |
3878                'raptor_free_abbrev_node': events 31-33
3879                  |
3880                  |   95 |   if(--node->ref_count)
3881                  |      |     ~  ~~~~^~~~~~~~~~~
3882                  |      |     |      |
3883                  |      |     |      (31) ...to here
3884                  |      |     (32) following 'false' branch...
3885                  |......
3886                  |   98 |   if(node->term)
3887                  |      |      ~~~~~~~~~~
3888                  |      |          |
3889                  |      |          (33) ...to here
3890                  |
3891                'raptor_free_abbrev_node': event 34
3892                  |
3893                  |raptor_internal.h:75:34:
3894                  |   75 | #define RAPTOR_FREE(type, ptr)   free((void*)ptr)
3895                  |      |                                  ^~~~~~~~~~~~~~~~
3896                  |      |                                  |
3897                  |      |                                  (34) freed here
3898raptor_abbrev.c:101:3: note: in expansion of macro 'RAPTOR_FREE'
3899                  |  101 |   RAPTOR_FREE(raptor_abbrev_node, node);
3900                  |      |   ^~~~~~~~~~~
3901                  |
3902           <------+
3903           |
3904         'raptor_free_abbrev_subject': events 35-41
3905           |
3906           |  308 |     raptor_free_abbrev_node(subject->node);
3907           |      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3908           |      |     |
3909           |      |     (35) returning to 'raptor_free_abbrev_subject' from 'raptor_free_abbrev_node'
3910           |  309 |
3911           |  310 |   if(subject->node_type)
3912           |      |     ~
3913           |      |     |
3914           |      |     (36) following 'false' branch...
3915           |......
3916           |  313 |   if(subject->properties)
3917           |      |     ~~~~~~~~~~~~~~~~~~~~
3918           |      |     |       |
3919           |      |     |       (37) ...to here
3920           |      |     (38) following 'true' branch...
3921           |  314 |     raptor_free_avltree(subject->properties);
3922           |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3923           |      |     |
3924           |      |     (39) ...to here
3925           |  315 |
3926           |  316 |   if(subject->list_items)
3927           |      |     ~
3928           |      |     |
3929           |      |     (40) following 'true' branch...
3930           |  317 |     raptor_free_sequence(subject->list_items);
3931           |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3932           |      |     |
3933           |      |     (41) ...to here
3934           |
3935    <------+
3936    |
3937  'raptor_abbrev_subject_find': events 42-43
3938    |
3939    |  436 |   raptor_free_abbrev_subject(lookup);
3940    |      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3941    |      |   |
3942    |      |   (42) returning to 'raptor_abbrev_subject_find' from 'raptor_free_abbrev_subject'
3943    |  437 |   raptor_free_abbrev_node(lookup_node);
3944    |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3945    |      |   |
3946    |      |   (43) calling 'raptor_free_abbrev_node' from 'raptor_abbrev_subject_find'
3947    |
3948    +--> 'raptor_free_abbrev_node': event 44
3949           |
3950           |   91 | raptor_free_abbrev_node(raptor_abbrev_node* node)
3951           |      | ^~~~~~~~~~~~~~~~~~~~~~~
3952           |      | |
3953           |      | (44) entry to 'raptor_free_abbrev_node'
3954           |
3955         'raptor_free_abbrev_node': event 45
3956           |
3957           |raptor_internal.h:156:5:
3958           |  156 |   if(!pointer) { \
3959           |      |     ^
3960           |      |     |
3961           |      |     (45) following 'false' branch (when 'node' is non-NULL)...
3962raptor_abbrev.c:93:3: note: in expansion of macro 'RAPTOR_ASSERT_OBJECT_POINTER_RETURN'
3963           |   93 |   RAPTOR_ASSERT_OBJECT_POINTER_RETURN(node, raptor_abbrev_node);
3964           |      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3965           |
3966         'raptor_free_abbrev_node': events 46-47
3967           |
3968           |   95 |   if(--node->ref_count)
3969           |      |        ~~~~^~~~~~~~~~~
3970           |      |            |
3971           |      |            (46) ...to here
3972           |      |            (47) use after 'free' of 'node'; freed at (34)
3973           |
3974raptor_serialize_rss.c: In function 'raptor_rss10_set_item_group':
3975raptor_serialize_rss.c:167:13: warning: dereference of possibly-NULL 'gm' [CWE-690] [-Wanalyzer-possible-null-dereference]
3976  167 |   gm->world = rss_serializer->world;
3977      |   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
3978  'raptor_rss10_serialize_end': events 1-2
3979    |
3980    | 2082 | raptor_rss10_serialize_end(raptor_serializer* serializer)
3981    |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
3982    |      | |
3983    |      | (1) entry to 'raptor_rss10_serialize_end'
3984    |......
3985    | 2101 |   raptor_rss10_build_items(rss_serializer);
3986    |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3987    |      |   |
3988    |      |   (2) calling 'raptor_rss10_build_items' from 'raptor_rss10_serialize_end'
3989    |
3990    +--> 'raptor_rss10_build_items': events 3-16
3991           |
3992           |  959 | raptor_rss10_build_items(raptor_rss10_serializer_context *rss_serializer)
3993           |      | ^~~~~~~~~~~~~~~~~~~~~~~~
3994           |      | |
3995           |      | (3) entry to 'raptor_rss10_build_items'
3996           |......
3997           |  965 |   if(!rss_serializer->seq_term)
3998           |      |     ~
3999           |      |     |
4000           |      |     (4) following 'false' branch...
4001           |......
4002           |  968 |   size = raptor_sequence_size(rss_serializer->triples);
4003           |      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4004           |      |          |
4005           |      |          (5) ...to here
4006           |  969 |   for(i = 0; i < size; i++) {
4007           |      |              ~~~~~~~~
4008           |      |                |
4009           |      |                (6) following 'true' branch (when 'i < size')...
4010           |  970 |     int ordinal = -1;
4011           |      |         ~~~~~~~
4012           |      |         |
4013           |      |         (7) ...to here
4014           |......
4015           |  974 |     if(!s)
4016           |      |       ~
4017           |      |       |
4018           |      |       (8) following 'false' branch (when 's' is non-NULL)...
4019           |......
4020           |  984 |     if(s->object->type != RAPTOR_TERM_TYPE_URI) {
4021           |      |       ~~~~~~~~~~
4022           |      |       | |
4023           |      |       | (9) ...to here
4024           |      |       (10) following 'false' branch...
4025           |......
4026           |  990 |     if(raptor_term_equals(s->subject, rss_serializer->seq_term)) {
4027           |      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4028           |      |       ||
4029           |      |       |(11) ...to here
4030           |      |       (12) following 'true' branch...
4031           |......
4032           |  995 |       uri_str = raptor_uri_as_string(s->predicate->value.uri);
4033           |      |                                      ~~~~~~~~~~~~
4034           |      |                                       |
4035           |      |                                       (13) ...to here
4036           |......
4037           | 1010 |       if(ordinal >= 0) {
4038           |      |         ~
4039           |      |         |
4040           |      |         (14) following 'true' branch (when 'ordinal >= 0')...
4041           |......
4042           | 1013 |         item = raptor_new_rss_item(rss_serializer->world);
4043           |      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4044           |      |                |
4045           |      |                (15) ...to here
4046           |......
4047           | 1024 |         raptor_rss10_set_item_group(rss_serializer, item->term, item);
4048           |      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4049           |      |         |
4050           |      |         (16) calling 'raptor_rss10_set_item_group' from 'raptor_rss10_build_items'
4051           |
4052           +--> 'raptor_rss10_set_item_group': events 17-18
4053                  |
4054                  |  158 | raptor_rss10_set_item_group(raptor_rss10_serializer_context *rss_serializer,
4055                  |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
4056                  |      | |
4057                  |      | (17) entry to 'raptor_rss10_set_item_group'
4058                  |......
4059                  |  163 |   if(raptor_rss10_get_group_item(rss_serializer, term))
4060                  |      |     ~
4061                  |      |     |
4062                  |      |     (18) following 'false' branch...
4063                  |
4064                'raptor_rss10_set_item_group': event 19
4065                  |
4066                  |raptor_internal.h:73:48:
4067                  |   73 | #define RAPTOR_CALLOC(type, nmemb, size) (type)calloc(nmemb, size)
4068                  |      |                                                ^~~~~~~~~~~~~~~~~~~
4069                  |      |                                                |
4070                  |      |                                                (19) ...to here
4071raptor_serialize_rss.c:166:8: note: in expansion of macro 'RAPTOR_CALLOC'
4072                  |  166 |   gm = RAPTOR_CALLOC(raptor_rss_group_map*, 1, sizeof(*gm));
4073                  |      |        ^~~~~~~~~~~~~
4074                  |
4075                'raptor_rss10_set_item_group': event 20
4076                  |
4077                  |raptor_internal.h:73:48:
4078                  |   73 | #define RAPTOR_CALLOC(type, nmemb, size) (type)calloc(nmemb, size)
4079                  |      |                                                ^~~~~~~~~~~~~~~~~~~
4080                  |      |                                                |
4081                  |      |                                                (20) this call could return NULL
4082raptor_serialize_rss.c:166:8: note: in expansion of macro 'RAPTOR_CALLOC'
4083                  |  166 |   gm = RAPTOR_CALLOC(raptor_rss_group_map*, 1, sizeof(*gm));
4084                  |      |        ^~~~~~~~~~~~~
4085                  |
4086                'raptor_rss10_set_item_group': event 21
4087                  |
4088                  |  167 |   gm->world = rss_serializer->world;
4089                  |      |   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
4090                  |      |             |
4091                  |      |             (21) 'gm' could be NULL: unchecked value from (20)
4092                  |
4093In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
4094                 from raptor_serialize_rss.c:30:
4095raptor_serialize_rss.c: In function 'raptor_rss10_ensure_atom_feed_valid':
4096/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17: warning: use of possibly-NULL '*field.value' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
4097   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
4098      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4099raptor_serialize_rss.c:1673:7: note: in expansion of macro 'memcpy'
4100 1673 |       memcpy(field->value, "untitled", 9);
4101      |       ^~~~~~
4102  'raptor_rss10_serialize_end': events 1-2
4103    |
4104    | 2082 | raptor_rss10_serialize_end(raptor_serializer* serializer)
4105    |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
4106    |      | |
4107    |      | (1) entry to 'raptor_rss10_serialize_end'
4108    |......
4109    | 2105 |   raptor_rss10_move_anonymous_statements(rss_serializer);
4110    |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4111    |      |   |
4112    |      |   (2) calling 'raptor_rss10_move_anonymous_statements' from 'raptor_rss10_serialize_end'
4113    |
4114    +--> 'raptor_rss10_move_anonymous_statements': events 3-7
4115           |
4116           |  453 | raptor_rss10_move_anonymous_statements(raptor_rss10_serializer_context *rss_serializer)
4117           |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4118           |      | |
4119           |      | (3) entry to 'raptor_rss10_move_anonymous_statements'
4120           |......
4121           |  462 |   for(round = 0; handled; round++) {
4122           |      |                  ~~~~~~~
4123           |      |                  |
4124           |      |                  (4) following 'true' branch (when 'handled != 0')...
4125           |      |                  (6) following 'false' branch (when 'handled == 0')...
4126           |  463 |     int size = raptor_sequence_size(rss_serializer->triples);
4127           |      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4128           |      |                |
4129           |      |                (5) ...to here
4130           |......
4131           |  502 |   return 0;
4132           |      |          ~
4133           |      |          |
4134           |      |          (7) ...to here
4135           |
4136    <------+
4137    |
4138  'raptor_rss10_serialize_end': events 8-11
4139    |
4140    | 2105 |   raptor_rss10_move_anonymous_statements(rss_serializer);
4141    |      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4142    |      |   |
4143    |      |   (8) returning to 'raptor_rss10_serialize_end' from 'raptor_rss10_move_anonymous_statements'
4144    | 2106 |
4145    | 2107 |   if(is_atom) {
4146    |      |     ~
4147    |      |     |
4148    |      |     (9) following 'true' branch (when 'is_atom != 0')...
4149    |......
4150    | 2110 |     raptor_rss10_ensure_atom_feed_valid(rss_serializer);
4151    |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4152    |      |     |
4153    |      |     (10) ...to here
4154    |      |     (11) calling 'raptor_rss10_ensure_atom_feed_valid' from 'raptor_rss10_serialize_end'
4155    |
4156    +--> 'raptor_rss10_ensure_atom_feed_valid': events 12-18
4157           |
4158           | 1589 | raptor_rss10_ensure_atom_feed_valid(raptor_rss10_serializer_context *rss_serializer)
4159           |      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4160           |      | |
4161           |      | (12) entry to 'raptor_rss10_ensure_atom_feed_valid'
4162           |......
4163           | 1609 |   if(!is_atom)
4164           |      |     ~
4165           |      |     |
4166           |      |     (13) following 'false' branch (when 'is_atom != 0')...
4167           |......
4168           | 1612 |   item = rss_model->common[RAPTOR_RSS_CHANNEL];
4169           |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4170           |      |        |
4171           |      |        (14) ...to here
4172           |......
4173           | 1659 |   for(i = 0; i < size; i++) {
4174           |      |              ~~~~~~~~
4175           |      |                |
4176           |      |                (15) following 'true' branch (when 'i < size')...
4177           | 1660 |     item = (raptor_rss_item*)raptor_sequence_get_at(rss_serializer->items, i);
4178           |      |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4179           |      |                              |
4180           |      |                              (16) ...to here
4181           |......
4182           | 1670 |     if(!item->fields[RAPTOR_RSS_FIELD_ATOM_TITLE]) {
4183           |      |       ~
4184           |      |       |
4185           |      |       (17) following 'true' branch...
4186           | 1671 |       raptor_rss_field* field = raptor_rss_new_field(rss_serializer->world);
4187           |      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4188           |      |                                 |
4189           |      |                                 (18) ...to here
4190           |
4191         'raptor_rss10_ensure_atom_feed_valid': event 19
4192           |
4193           |raptor_internal.h:72:41:
4194           |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
4195           |      |                                         ^~~~~~~~~~~~
4196           |      |                                         |
4197           |      |                                         (19) this call could return NULL
4198raptor_serialize_rss.c:1672:22: note: in expansion of macro 'RAPTOR_MALLOC'
4199           | 1672 |       field->value = RAPTOR_MALLOC(unsigned char*, 9);
4200           |      |                      ^~~~~~~~~~~~~
4201           |
4202         'raptor_rss10_ensure_atom_feed_valid': event 20
4203           |
4204           |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
4205           |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
4206           |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4207           |      |                 |
4208           |      |                 (20) argument 1 ('*field.value') from (19) could be NULL where non-null expected
4209raptor_serialize_rss.c:1673:7: note: in expansion of macro 'memcpy'
4210           | 1673 |       memcpy(field->value, "untitled", 9);
4211           |      |       ^~~~~~
4212           |
4213<built-in>: note: argument 1 of '__builtin___memcpy_chk' must be non-null
4214In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
4215                 from raptor_www_curl.c:33:
4216raptor_www_curl.c: In function 'raptor_www_curl_header_callback':
4217/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17: warning: use of possibly-NULL 'type_buffer' where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
4218   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
4219      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4220raptor_www_curl.c:115:5: note: in expansion of macro 'memcpy'
4221  115 |     memcpy(type_buffer, (char*)ptr + 14, len);
4222      |     ^~~~~~
4223  'raptor_www_curl_header_callback': event 1
4224    |
4225    |  108 |   if(www->failed)
4226    |      |     ^
4227    |      |     |
4228    |      |     (1) following 'false' branch...
4229    |
4230  'raptor_www_curl_header_callback': event 2
4231    |
4232    |raptor_internal.h:779:28:
4233    |  779 | #define raptor_strncasecmp strncasecmp
4234raptor_www_curl.c:112:7: note: in expansion of macro 'raptor_strncasecmp'
4235    |  112 |   if(!raptor_strncasecmp((char*)ptr, "Content-Type: ", CONTENT_TYPE_LEN)) {
4236    |      |       ^~~~~~~~~~~~~~~~~~
4237    |
4238  'raptor_www_curl_header_callback': events 3-4
4239    |
4240    |  112 |   if(!raptor_strncasecmp((char*)ptr, "Content-Type: ", CONTENT_TYPE_LEN)) {
4241    |      |     ^
4242    |      |     |
4243    |      |     (3) following 'true' branch...
4244    |  113 |     size_t len = bytes - CONTENT_TYPE_LEN - 2; /* for \r\n */
4245    |      |            ~~~
4246    |      |            |
4247    |      |            (4) ...to here
4248    |
4249  'raptor_www_curl_header_callback': event 5
4250    |
4251    |raptor_internal.h:72:41:
4252    |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
4253    |      |                                         ^~~~~~~~~~~~
4254    |      |                                         |
4255    |      |                                         (5) this call could return NULL
4256raptor_www_curl.c:114:25: note: in expansion of macro 'RAPTOR_MALLOC'
4257    |  114 |     char *type_buffer = RAPTOR_MALLOC(char*, len + 1);
4258    |      |                         ^~~~~~~~~~~~~
4259    |
4260  'raptor_www_curl_header_callback': event 6
4261    |
4262    |/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_string.h:63:17:
4263    |   63 |                 __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest))
4264    |      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4265    |      |                 |
4266    |      |                 (6) argument 1 ('type_buffer') from (5) could be NULL where non-null expected
4267raptor_www_curl.c:115:5: note: in expansion of macro 'memcpy'
4268    |  115 |     memcpy(type_buffer, (char*)ptr + 14, len);
4269    |      |     ^~~~~~
4270    |
4271<built-in>: note: argument 1 of '__builtin___memcpy_chk' must be non-null
4272In file included from raptor_nfc_icu.c:41:
4273raptor_nfc_icu.c: In function 'raptor_nfc_icu_check':
4274raptor_internal.h:72:41: warning: allocated buffer size is not a multiple of the pointee's size [CWE-131] [-Wanalyzer-allocation-size]
4275   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
4276      |                                         ^~~~~~~~~~~~
4277raptor_nfc_icu.c:78:10: note: in expansion of macro 'RAPTOR_MALLOC'
4278   78 |   dest = RAPTOR_MALLOC(UChar*, dest_capacity + 1);
4279      |          ^~~~~~~~~~~~~
4280  'raptor_nfc_icu_check': event 1
4281    |
4282    |raptor_internal.h:72:41:
4283    |   72 | #define RAPTOR_MALLOC(type, size) (type)malloc(size)
4284    |      |                                         ^~~~~~~~~~~~
4285    |      |                                         |
4286    |      |                                         (1) allocated '((int)len << 1) + 1' bytes and assigned to 'UChar *' {aka 'short unsigned int *'} here; 'sizeof (UChar {aka short unsigned int})' is '2'
4287raptor_nfc_icu.c:78:10: note: in expansion of macro 'RAPTOR_MALLOC'
4288    |   78 |   dest = RAPTOR_MALLOC(UChar*, dest_capacity + 1);
4289    |      |          ^~~~~~~~~~~~~
4290    |
4291rdfdiff.c: In function 'main':
4292rdfdiff.c:916:20: warning: dereference of NULL '0' [CWE-476] [-Wanalyzer-null-dereference]
4293  916 |         prev->next = node->next;
4294      |         ~~~~~~~~~~~^~~~~~~~~~~~
4295  'main': events 1-20
4296    |
4297    |  719 | main(int argc, char *argv[])
4298    |      | ^~~~
4299    |      | |
4300    |      | (1) entry to 'main'
4301    |......
4302    |  746 |   if(!world)
4303    |      |     ~
4304    |      |     |
4305    |      |     (2) following 'false' branch (when 'world' is non-NULL)...
4306    |  747 |     exit(1);
4307    |  748 |   rv = raptor_world_open(world);
4308    |      |        ~~~~~~~~~~~~~~~~~~~~~~~~
4309    |      |        |
4310    |      |        (3) ...to here
4311    |  749 |   if(rv)
4312    |      |     ~
4313    |      |     |
4314    |      |     (4) following 'false' branch (when 'rv == 0')...
4315    |......
4316    |  752 |   while(!usage && !help)
4317    |      |        ~~~~~~~~~~~~~~~~
4318    |      |        |       |
4319    |      |        |       (6) following 'true' branch...
4320    |      |        |       (10) following 'true' branch...
4321    |      |        (5) ...to here
4322    |......
4323    |  756 |     int option_index = 0;
4324    |      |         ~~~~~~~~~~~~
4325    |      |         |
4326    |      |         (7) ...to here
4327    |      |         (11) ...to here
4328    |......
4329    |  762 |     if(c == -1)
4330    |      |       ~
4331    |      |       |
4332    |      |       (8) following 'false' branch (when 'c != -1')...
4333    |......
4334    |  765 |     switch (c) {
4335    |      |     ~~~~~~
4336    |      |     |
4337    |      |     (9) ...to here
4338    |......
4339    |  802 |   if(usage) {
4340    |      |     ~
4341    |      |     |
4342    |      |     (12) following 'false' branch (when 'usage == 0')...
4343    |......
4344    |  814 |   if(help) {
4345    |      |     ~
4346    |      |     |
4347    |      |     (13) ...to here
4348    |      |     (14) following 'false' branch (when 'help == 0')...
4349    |......
4350    |  829 |   from_string = (unsigned char *)argv[optind++];
4351    |      |                                       ~~~~~~~~
4352    |      |                                             |
4353    |      |                                             (15) ...to here
4354    |......
4355    |  855 |   if(!from_uri) {
4356    |      |     ~
4357    |      |     |
4358    |      |     (16) following 'false' branch (when 'from_uri' is non-NULL)...
4359    |......
4360    |  861 |   to_uri = raptor_new_uri(world, to_string);
4361    |      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4362    |      |            |
4363    |      |            (17) ...to here
4364    |  862 |   if(!to_uri) {
4365    |      |     ~
4366    |      |     |
4367    |      |     (18) following 'false' branch (when 'to_uri' is non-NULL)...
4368    |......
4369    |  869 |   from_file = rdfdiff_new_file(world, from_string, from_syntax);
4370    |      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4371    |      |               |
4372    |      |               (19) ...to here
4373    |      |               (20) calling 'rdfdiff_new_file' from 'main'
4374    |
4375    +--> 'rdfdiff_new_file': events 21-24
4376           |
4377           |  178 | rdfdiff_new_file(raptor_world *world, const unsigned char *name, const char *syntax)
4378           |      | ^~~~~~~~~~~~~~~~
4379           |      | |
4380           |      | (21) entry to 'rdfdiff_new_file'
4381           |......
4382           |  181 |   if(file) {
4383           |      |     ~
4384           |      |     |
4385           |      |     (22) following 'true' branch (when 'file' is non-NULL)...
4386           |  182 |     size_t name_len = strlen((const char*)name);
4387           |      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~
4388           |      |                       |
4389           |      |                       (23) ...to here
4390           |......
4391           |  185 |     if(!file->name) {
4392           |      |       ~
4393           |      |       |
4394           |      |       (24) following 'false' branch...
4395           |
4396         'rdfdiff_new_file': event 25
4397           |
4398           |  189 |     memcpy(file->name, name, name_len + 1);
4399           |      |            ~~~~^~~~~~
4400           |      |                |
4401           |      |                (25) ...to here
4402/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_common.h:38:55: note: in definition of macro '__darwin_obsz0'
4403           |   38 | #define __darwin_obsz0(object) __builtin_object_size (object, 0)
4404           |      |                                                       ^~~~~~
4405rdfdiff.c:189:5: note: in expansion of macro 'memcpy'
4406           |  189 |     memcpy(file->name, name, name_len + 1);
4407           |      |     ^~~~~~
4408           |
4409         'rdfdiff_new_file': events 26-27
4410           |
4411           |  192 |     if(file->parser) {
4412           |      |       ^
4413           |      |       |
4414           |      |       (26) following 'true' branch...
4415           |  193 |       raptor_world_set_log_handler(world, file, rdfdiff_log_handler);
4416           |      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4417           |      |       |
4418           |      |       (27) ...to here
4419           |
4420    <------+
4421    |
4422  'main': events 28-31
4423    |
4424    |  869 |   from_file = rdfdiff_new_file(world, from_string, from_syntax);
4425    |      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4426    |      |               |
4427    |      |               (28) returning to 'main' from 'rdfdiff_new_file'
4428    |  870 |   if(!from_file) {
4429    |      |     ~         
4430    |      |     |
4431    |      |     (29) following 'false' branch...
4432    |......
4433    |  876 |   to_file = rdfdiff_new_file(world, to_string, to_syntax);
4434    |      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4435    |      |             |
4436    |      |             (30) ...to here
4437    |      |             (31) calling 'rdfdiff_new_file' from 'main'
4438    |
4439    +--> 'rdfdiff_new_file': events 32-35
4440           |
4441           |  178 | rdfdiff_new_file(raptor_world *world, const unsigned char *name, const char *syntax)
4442           |      | ^~~~~~~~~~~~~~~~
4443           |      | |
4444           |      | (32) entry to 'rdfdiff_new_file'
4445           |......
4446           |  181 |   if(file) {
4447           |      |     ~
4448           |      |     |
4449           |      |     (33) following 'true' branch (when 'file' is non-NULL)...
4450           |  182 |     size_t name_len = strlen((const char*)name);
4451           |      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~
4452           |      |                       |
4453           |      |                       (34) ...to here
4454           |......
4455           |  185 |     if(!file->name) {
4456           |      |       ~
4457           |      |       |
4458           |      |       (35) following 'false' branch...
4459           |
4460         'rdfdiff_new_file': event 36
4461           |
4462           |  189 |     memcpy(file->name, name, name_len + 1);
4463           |      |            ~~~~^~~~~~
4464           |      |                |
4465           |      |                (36) ...to here
4466/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_common.h:38:55: note: in definition of macro '__darwin_obsz0'
4467           |   38 | #define __darwin_obsz0(object) __builtin_object_size (object, 0)
4468           |      |                                                       ^~~~~~
4469rdfdiff.c:189:5: note: in expansion of macro 'memcpy'
4470           |  189 |     memcpy(file->name, name, name_len + 1);
4471           |      |     ^~~~~~
4472           |
4473         'rdfdiff_new_file': events 37-38
4474           |
4475           |  192 |     if(file->parser) {
4476           |      |       ^
4477           |      |       |
4478           |      |       (37) following 'true' branch...
4479           |  193 |       raptor_world_set_log_handler(world, file, rdfdiff_log_handler);
4480           |      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4481           |      |       |
4482           |      |       (38) ...to here
4483           |
4484    <------+
4485    |
4486  'main': events 39-48
4487    |
4488    |  876 |   to_file = rdfdiff_new_file(world, to_string, to_syntax);
4489    |      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4490    |      |             |
4491    |      |             (39) returning to 'main' from 'rdfdiff_new_file'
4492    |  877 |   if(!to_file) {
4493    |      |     ~       
4494    |      |     |
4495    |      |     (40) following 'false' branch...
4496    |......
4497    |  883 |   raptor_parser_set_statement_handler(from_file->parser, from_file,
4498    |      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4499    |      |   |
4500    |      |   (41) ...to here
4501    |  884 |                                rdfdiff_collect_statements);
4502    |      |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4503    |  885 |
4504    |  886 |   if(raptor_parser_parse_uri(from_file->parser, from_uri, base_uri)) {
4505    |      |     ~       
4506    |      |     |
4507    |      |     (42) following 'false' branch...
4508    |......
4509    |  894 |     raptor_parser_set_statement_handler(to_file->parser, to_file,
4510    |      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4511    |      |     |
4512    |      |     (43) ...to here
4513    |  895 |                                  rdfdiff_collect_statements);
4514    |      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4515    |  896 |     if(raptor_parser_parse_uri(to_file->parser, to_uri, base_uri ? base_uri: from_uri)) {
4516    |      |       ~     
4517    |      |       |
4518    |      |       (44) following 'false' branch...
4519    |......
4520    |  906 |   cur = to_file->first;
4521    |      |                ~~
4522    |      |                |
4523    |      |                (45) ...to here
4524    |  907 |   while(cur) {
4525    |      |         ~~~ 
4526    |      |         |
4527    |      |         (46) following 'true' branch (when 'cur' is non-NULL)...
4528    |......
4529    |  910 |     node = rdfdiff_statement_find(from_file, cur->statement, &prev);
4530    |      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4531    |      |            |                                    |
4532    |      |            |                                    (47) ...to here
4533    |      |            (48) calling 'rdfdiff_statement_find' from 'main'
4534    |
4535    +--> 'rdfdiff_statement_find': events 49-53
4536           |
4537           |  652 | rdfdiff_statement_find(rdfdiff_file* file, const raptor_statement *statement,
4538           |      | ^~~~~~~~~~~~~~~~~~~~~~
4539           |      | |
4540           |      | (49) entry to 'rdfdiff_statement_find'
4541           |......
4542           |  655 |   rdfdiff_link* prev = NULL;
4543           |      |                 ~~~~
4544           |      |                 |
4545           |      |                 (50) 'prev' is NULL
4546           |......
4547           |  658 |   while(cur) {
4548           |      |         ~~~
4549           |      |         |
4550           |      |         (51) following 'true' branch (when 'cur' is non-NULL)...
4551           |  659 |     if(rdfdiff_statement_equals(file->world, cur->statement, statement)) {
4552           |      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4553           |      |        |                                        |
4554           |      |        |                                        (52) ...to here
4555           |      |        (53) calling 'rdfdiff_statement_equals' from 'rdfdiff_statement_find'
4556           |
4557           +--> 'rdfdiff_statement_equals': events 54-68
4558                  |
4559                  |  283 | rdfdiff_statement_equals(raptor_world *world, const raptor_statement *s1, const raptor_statement *s2)
4560                  |      | ^~~~~~~~~~~~~~~~~~~~~~~~
4561                  |      | |
4562                  |      | (54) entry to 'rdfdiff_statement_equals'
4563                  |......
4564                  |  287 |   if(!s1 || !s2)
4565                  |      |     ~
4566                  |      |     |
4567                  |      |     (55) following 'false' branch...
4568                  |......
4569                  |  298 |   if(s1->subject->type != s2->subject->type) {
4570                  |      |     ~~~~~~~~~~~~
4571                  |      |     |  |
4572                  |      |     |  (56) ...to here
4573                  |      |     (57) following 'false' branch...
4574                  |......
4575                  |  303 |   if(s1->subject->type == RAPTOR_TERM_TYPE_BLANK) {
4576                  |      |      ~~~~~~~~~~~
4577                  |      |        |
4578                  |      |        (58) ...to here
4579                  |......
4580                  |  316 |   if(s1->predicate->type != s2->predicate->type) {
4581                  |      |     ~
4582                  |      |     |
4583                  |      |     (59) following 'false' branch...
4584                  |......
4585                  |  321 |   if(!raptor_uri_equals(s1->predicate->value.uri,
4586                  |      |     ~
4587                  |      |     |
4588                  |      |     (61) following 'false' branch...
4589                  |  322 |                         s2->predicate->value.uri)) {
4590                  |      |                         ~~~~~~~~~~~~~
4591                  |      |                           |
4592                  |      |                           (60) ...to here
4593                  |......
4594                  |  327 |   if(s1->object->type != s2->object->type) {
4595                  |      |     ~~~~~~~~~~~
4596                  |      |     |  |
4597                  |      |     |  (62) ...to here
4598                  |      |     (63) following 'false' branch...
4599                  |......
4600                  |  332 |   if(s1->object->type == RAPTOR_TERM_TYPE_LITERAL) {
4601                  |      |     ~~~~~~~~~~~
4602                  |      |     |  |
4603                  |      |     |  (64) ...to here
4604                  |      |     (65) following 'false' branch...
4605                  |......
4606                  |  354 |   } else if(s1->object->type == RAPTOR_TERM_TYPE_BLANK) {
4607                  |      |            ~~~~~~~~~~~
4608                  |      |            |  |
4609                  |      |            |  (66) ...to here
4610                  |      |            (67) following 'false' branch...
4611                  |......
4612                  |  361 |                           s2->object->value.uri)) {
4613                  |      |                           ~~~~~~~~~~
4614                  |      |                             |
4615                  |      |                             (68) ...to here
4616                  |
4617           <------+
4618           |
4619         'rdfdiff_statement_find': events 69-74
4620           |
4621           |  659 |     if(rdfdiff_statement_equals(file->world, cur->statement, statement)) {
4622           |      |       ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4623           |      |       ||
4624           |      |       |(69) returning to 'rdfdiff_statement_find' from 'rdfdiff_statement_equals'
4625           |      |       (70) following 'true' branch...
4626           |  660 |       if(prev_p)
4627           |      |         ~
4628           |      |         |
4629           |      |         (71) ...to here
4630           |      |         (72) following 'true' branch (when 'prev_p' is non-NULL)...
4631           |  661 |         *prev_p=prev;
4632           |      |         ~~~~~~~~~~~~
4633           |      |                |
4634           |      |                (73) ...to here
4635           |      |                (74) 'prev' is NULL
4636           |
4637    <------+
4638    |
4639  'main': events 75-81
4640    |
4641    |  910 |     node = rdfdiff_statement_find(from_file, cur->statement, &prev);
4642    |      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4643    |      |            |
4644    |      |            (75) returning to 'main' from 'rdfdiff_statement_find'
4645    |  911 |     if(node) {
4646    |      |       ~     
4647    |      |       |
4648    |      |       (76) following 'true' branch (when 'node' is non-NULL)...
4649    |  912 |       /* exists in from file - remove it from the list */
4650    |  913 |       if(from_file->first == node) {
4651    |      |         ~         ~~
4652    |      |         |         |
4653    |      |         |         (77) ...to here
4654    |      |         (78) following 'false' branch...
4655    |......
4656    |  916 |         prev->next = node->next;
4657    |      |         ~~~~~~~~~~~~~~~~~~~~~~~
4658    |      |             |      |
4659    |      |             |      (81) dereference of NULL 'prev'
4660    |      |             (79) ...to here
4661    |      |             (80) 'prev' is NULL
4662    |
4663dyld: Library not loaded: @rpath/libicui18n.73.dylib
4664  Referenced from: /Users/ericgallager/Documents/GitHub/raptor2/src/.libs/libraptor2.0.dylib
4665  Reason: image not found
4666/bin/sh: line 1: 72403 Abort trap: 6           ../scripts/build-formats > raptor-formats.xml
4667make[1]: *** [raptor-formats.xml] Error 134
4668make: *** [all-recursive] Error 1