Skip to content
Permalink
Browse files
Fixed NULL pointer dereference.
  • Loading branch information
icculus committed Dec 21, 2008
1 parent 66a2d46 commit f264e957a436f633051efb1e2721bab5342b276e

File 1 of 1 in f264e95

@@ -1712,8 +1712,11 @@ static uint32 add_ctab_bytes(Context *ctx, const uint8 *bytes, const size_t len)
void *ptr = Malloc(ctx, ctx->ctab_allocation);
if (ptr == NULL)
return 0;
memcpy(ptr, ctx->ctab, ctx->ctab_len);
Free(ctx, ctx->ctab);
if (ctx->ctab != NULL)
{
memcpy(ptr, ctx->ctab, ctx->ctab_len);
Free(ctx, ctx->ctab);
} // if
ctx->ctab = (uint8 *) ptr;
} // if

0 comments on commit f264e95

Please sign in to comment.