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