Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized variable #629

Closed
maddin200 opened this issue Oct 12, 2015 · 0 comments
Closed

Uninitialized variable #629

maddin200 opened this issue Oct 12, 2015 · 0 comments

Comments

@maddin200
Copy link
Contributor

src\lib\openjp3d\jp3d.c line 1018 Uninitialized variable: numbands

Code:
int bandno, numbands;
int expn, mant;

opj_cp_t *cp = j3d->cp;
opj_tcp_t *tcp = &cp->tcps[j3d->curtileno];
opj_tccp_t *tccp = &tcp->tccps[compno];
opj_cio_t *cio = j3d->cio;

cio_write(cio, tccp->qntsty + (tccp->numgbits << 5), 1);    /* Sqcx : Table A28 de 15444-1*/

if (j3d->cinfo->codec_format == CODEC_J2K)
    numbands = tccp->qntsty == J3D_CCP_QNTSTY_SIQNT ? 1 : tccp->numresolution[0] * 3 - 2; 
else if (j3d->cinfo->codec_format == CODEC_J3D) {
    int diff = tccp->numresolution[0] - tccp->numresolution[2];
    numbands = (tccp->qntsty == J3D_CCP_QNTSTY_SIQNT) ? 1 : (tccp->numresolution[0] * 7 - 6) - 4 *diff; /* SIQNT vs. SEQNT */
}

for (bandno = 0; bandno < numbands; bandno++) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant