static long sfile_seek(jas_stream_obj_t *obj, long offset, int origin)
{
	FILE *fp;
	fp = JAS_CAST(FILE *, obj);
	return fseek(fp, offset, origin);
}

The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.