Source
613
613
wr.buffer = output;
614
614
else {
615
615
wr.bufsize = MIN(header.dst_size, header.dict_size);
616
616
wr.buffer = large_malloc(wr.bufsize);
617
617
}
618
618
if (wr.buffer == NULL)
619
619
goto exit_1;
620
620
621
621
num_probs = LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp));
622
622
p = (uint16_t *) large_malloc(num_probs * sizeof(*p));
623
-
if (p == 0)
623
+
if (p == NULL)
624
624
goto exit_2;
625
625
num_probs = LZMA_LITERAL + (LZMA_LIT_SIZE << (lc + lp));
626
626
for (i = 0; i < num_probs; i++)
627
627
p[i] = (1 << RC_MODEL_TOTAL_BITS) >> 1;
628
628
629
629
rc_init_code(&rc);
630
630
631
631
while (get_pos(&wr) < header.dst_size) {
632
632
int pos_state = get_pos(&wr) & pos_state_mask;
633
633
uint16_t *prob = p + LZMA_IS_MATCH +