Commit Diff


commit - f844fce33a0bdff13cb94ca9ab463ae1ef33bc3b
commit + 91473d5f1fa4f5e83430127f82ec336551db3f28
blob - a193e66c4b8bb5b1665f3524ceeef5cba081f9f2
blob + 3b282184f21c92d3d3c6b73983f07c53cb54b3bf
--- pdf.c
+++ pdf.c
@@ -4909,7 +4909,7 @@ parse_xrefs(struct Env *aux)
 	}
 	if (res == NULL) {
 		log_message(5, "VIOLATION[5]: startxref not found\n");
-		return;
+		goto end;
 	}
 	offset = H_INDEX_UINT(res->ast, 0);
 
@@ -4921,7 +4921,7 @@ parse_xrefs(struct Env *aux)
 	if ( (offset <=0) || (offset >= aux->sz) ) {
 		log_message(5, "VIOLATION[5]: Invalid xref table offset = %ld. Valid range <0, %ld>\n",
 				offset, aux->sz);
-		return;
+		goto end;
 	}
 
 	// XXX try formulating this loop as one parser using h_seek and h_bind
@@ -4976,6 +4976,7 @@ parse_xrefs(struct Env *aux)
 		offset = (size_t)tok->sint;
 	}
 
+end:
 	aux->xrefs = xrefs;
 	aux->nxrefs = n;
 }