Check bf != NULL before accessing bf->code. Space fixes.
Don't overwrite characters before the start of a string:

    for(i=spot-2; text[i] == ' ' && i>=0; i--);

The loop wrote text[i] before checking i>=0.

Also, spaces.
Check for src != NULL before using it as the source in memcpy().
Also, spaces.
Move an if() statement that uses both v1 and v2 pointers under
the branch that checks for (v1 != NULL && v2 != NULL). Also, spaces.
Use the pointer returned by rlib_execute_pcode() as an indicator
for success (it can be NULL, too!) instead of relying on the fact
that it's &execute_result. The fix is in rlib_process_variables()
and rlib_process_expression_variables(). Also, spaces.
Use explicit zero length in rpdf_add_page_content_uncompressed()
when (pdf == NULL || pdf->page_data == NULL), use pdf->page_data->len
otherwise to prevent NULL pointer dereference.

Add pdf == NULL || pdf->page_data == NULL to the checks in
rpdf_add_page_content_compressed() before accessing
pdf->page_data->str or pdf->page_data->len  to prevent NULL pointer
dereference.
Merge pull request #3 from SICOM/fix-clang-analyser-errors

Fix clang analyser errors
RLIB-11 add json output format, WIP
RLIB-11 changed copyright
RLIB-11 more output functions
RLIB-11 part reports kinda working
RLIB-11 part reports kinda working
RLIB-11 part reports kinda working extra formatting data
RLIB-11 start to cleanup pages across/labels
RLIB-11 make html lint
RLIB-11 make html even better
RLIB-11 make html/xml even better and actually work
RLIB-11 make xml graphing progress
RLIB-11 add example of breaks
RLIB-11 initial support for pie chart sections