lCurrentMatrix = lCurrentData + pNbComp;
for (i =0;i<lNbMatCoeff;++i) {
- lCurrentMatrix[i] = (OPJ_INT32) (*(lMct++) * lMultiplicator);
+ lCurrentMatrix[i] = (OPJ_INT32) (*(lMct++) * (OPJ_FLOAT32)lMultiplicator);
}
for (i = 0; i < n; ++i) {
}
OPJ_UINT32 opj_raw_numbytes(opj_raw_t *raw) {
- return raw->bp - raw->start;
+ const ptrdiff_t diff = raw->bp - raw->start;
+ assert( diff <= 0xffffffff && diff >= 0 ); /* UINT32_MAX */
+ return (OPJ_UINT32)diff;
}
void opj_raw_init_dec(opj_raw_t *raw, OPJ_BYTE *bp, OPJ_UINT32 len) {
return 00;
}
memset(tree->nodes,0,tree->numnodes * sizeof(opj_tgt_node_t));
- tree->nodes_size = tree->numnodes * sizeof(opj_tgt_node_t);
+ tree->nodes_size = tree->numnodes * (OPJ_UINT32)sizeof(opj_tgt_node_t);
node = tree->nodes;
l_parent_node = &tree->nodes[tree->numleafsh * tree->numleafsv];
opj_tgt_destroy(p_tree);
return 00;
}
- l_node_size = p_tree->numnodes * sizeof(opj_tgt_node_t);
+ l_node_size = p_tree->numnodes * (OPJ_UINT32)sizeof(opj_tgt_node_t);
if (l_node_size > p_tree->nodes_size) {
opj_tgt_node_t* new_nodes = (opj_tgt_node_t*) opj_realloc(p_tree->nodes, l_node_size);