You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran the clang static analyzer on vorbis 1.3.5 and it reported these potential issues:
Logic error: Assigned value is garbage orundefined (libvorbis/lib/floor1.c:461)
libvorbis/lib/floor1.c
447 a->xb=xb;
448 a->yb=yb;
449 a->x2b=x2b;
450 a->y2b=y2b;
451 a->xyb=xyb;
452 a->bn=nb;
453454return(na);
455 }
456457staticintfit_line(lsfit_acc *a,int fits,int *y0,int *y1,
458 vorbis_info_floor1 *info){
459double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0;
460int i;
461int x0=a[0].x0;
^ Logic error: Assigned value is garbage or undefined
462int x1=a[fits-1].x1;
463464for(i=0;i<fits;i++){
465double weight = (a[i].bn+a[i].an)*info->twofitweight/(a[i].an+1)+1.;
466467 xb+=a[i].xb + a[i].xa * weight;
468 yb+=a[i].yb + a[i].ya * weight;
469 x2b+=a[i].x2b + a[i].x2a * weight;
470 y2b+=a[i].y2b + a[i].y2a * weight;
471 xyb+=a[i].xyb + a[i].xya * weight;
472 bn+=a[i].bn + a[i].an * weight;
473 }
474475if(*y0>=0){
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is >= 'posts'
libvorbis/lib/floor1.c592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Assuming 'i' is >= 'posts'596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Loop body executed 0 times
596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
^ Loop body executed 0 times
597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */599
Loop body executed 0 times
libvorbis/lib/floor1.c594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
^ Loop body executed 0 times
598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */599600/* quantize the relevant floor points and collect them into line fitLoop body executed 0 timeslibvorbis/lib/floor1.c 595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
^ Loop body executed 0 times
599600/* quantize the relevant floor points and collect them into line fit 601 structures (one per minimal division) at the same time */
Assuming 'posts' is not equal to 0
libvorbis/lib/floor1.c599600/* quantize the relevant floor points and collect them into line fit 601 structures (one per minimal division) at the same time */602if(posts==0){
^ Assuming 'posts' is not equal to 0603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
Loop body executed 0 times
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Loop body executed 0 times
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Assuming 'nonzero' is not equal to 0
libvorbis/lib/floor1.c608 n,info);
609 }
610611if(nonzero){
^ Assuming 'nonzero' is not equal to 0612/* start by fitting the implicit base case.... */613inty0=-200;
614inty1=-200;
Calling 'fit_line'
libvorbis/lib/floor1.c612/* start by fitting the implicit base case.... */613inty0=-200;
614inty1=-200;
615fit_line(fits,posts-1,&y0,&y1,info);
^ Calling 'fit_line'616617 fit_valueA[0]=y0;
618 fit_valueB[0]=y0;
Entered call from 'floor1_fit'
libvorbis/lib/floor1.c454return(na);
455 }
456457staticintfit_line(lsfit_acc *a,int fits,int *y0,int *y1,
^ Entered call from 'floor1_fit'458 vorbis_info_floor1 *info){
459double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0;
460int i;
Assigned value is garbage or undefined
libvorbis/lib/floor1.c458 vorbis_info_floor1 *info){
459double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0;
460int i;
461int x0=a[0].x0;
^ Assigned value is garbage or undefined
462int x1=a[fits-1].x1;
463464for(i=0;i<fits;i++){
----------
Logic error: Undefined or garbage value returned to caller (libvorbis/lib/floor1.c:570)
libvorbis/lib/floor1.c556if(y+info->maxover<val)return(1);
557if(y-info->maxunder>val)return(1);
558 }
559 }
560 }
561562if(info->maxover*info->maxover/n>info->maxerr)return(0);
563if(info->maxunder*info->maxunder/n>info->maxerr)return(0);
564if(mse/n>info->maxerr)return(1);
565return(0);
566 }
567568staticintpost_Y(int *A,int *B,int pos){
569if(A[pos]<0)
570return B[pos];
^ Logic error: Undefined or garbage value returned to caller
571if(B[pos]<0)
572return A[pos];
573574return (A[pos]+B[pos])>>1;
575 }
576577int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look,
578constfloat *logmdct, /* in */579constfloat *logmask){
580long i,j;
581 vorbis_info_floor1 *info=look->vi;
582long n=look->n;
583long posts=look->posts;
584long nonzero=0;
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is >= 'posts'
libvorbis/lib/floor1.c592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Assuming 'i' is >= 'posts'596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Loop body executed 0 times
596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
^ Loop body executed 0 times
597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */599
Loop body executed 0 times
libvorbis/lib/floor1.c594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
^ Loop body executed 0 times
598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */599600/* quantize the relevant floor points and collect them into line fitLoop body executed 0 timeslibvorbis/lib/floor1.c 595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
^ Loop body executed 0 times
599600/* quantize the relevant floor points and collect them into line fit 601 structures (one per minimal division) at the same time */
Assuming 'posts' is not equal to 0
libvorbis/lib/floor1.c599600/* quantize the relevant floor points and collect them into line fit 601 structures (one per minimal division) at the same time */602if(posts==0){
^ Assuming 'posts' is not equal to 0603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
Entering loop body
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Entering loop body
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Entering loop body
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Assuming 'nonzero' is not equal to 0
libvorbis/lib/floor1.c608 n,info);
609 }
610611if(nonzero){
^ Assuming 'nonzero' is not equal to 0612/* start by fitting the implicit base case.... */613inty0=-200;
614inty1=-200;
Entering loop body
libvorbis/lib/floor1.c623/* start progressive splitting. This is a greedy, non-optimal 624 algorithm, but simple and close enough to the best 625 answer. */626for(i=2;i<posts;i++){
^ Entering loop body
627int sortpos=look->reverse_index[i];
628int ln=loneighbor[sortpos];
629int hn=hineighbor[sortpos];
Looping back to the head of the loop
libvorbis/lib/floor1.c623/* start progressive splitting. This is a greedy, non-optimal 624 algorithm, but simple and close enough to the best 625 answer. */626for(i=2;i<posts;i++){
^ Looping back to the head of the loop
627int sortpos=look->reverse_index[i];
628int ln=loneighbor[sortpos];
629int hn=hineighbor[sortpos];
Entering loop body
libvorbis/lib/floor1.c706/* fill in posts marked as not using a fit; we will zero 707 back out to 'unused' when encoding them so long as curve 708 interpolation doesn't force them into use */709for(i=2;i<posts;i++){
^ Entering loop body
710int ln=look->loneighbor[i-2];
711int hn=look->hineighbor[i-2];
712int x0=info->postlist[ln];
Calling 'post_Y'
libvorbis/lib/floor1.c715inty1=output[hn];
716717int predicted=render_point(x0,x1,y0,y1,info->postlist[i]);
718int vx=post_Y(fit_valueA,fit_valueB,i);
^ Calling 'post_Y'719720if(vx>=0 && predicted!=vx){
721 output[i]=vx;
Entered call from 'floor1_fit'
libvorbis/lib/floor1.c565return(0);
566 }
567568staticintpost_Y(int *A,int *B,int pos){
^ Entered call from 'floor1_fit'569if(A[pos]<0)
570return B[pos];
571if(B[pos]<0)
Undefined or garbage value returned to caller
libvorbis/lib/floor1.c567568staticintpost_Y(int *A,int *B,int pos){
569if(A[pos]<0)
570return B[pos];
^ Undefined or garbage value returned to caller
571if(B[pos]<0)
572return A[pos];
573
----------
Logic error: The left operand of '<' is a garbage value (libvorbis/lib/floor1.c:571)
libvorbis/lib/floor1.c557if(y-info->maxunder>val)return(1);
558 }
559 }
560 }
561562if(info->maxover*info->maxover/n>info->maxerr)return(0);
563if(info->maxunder*info->maxunder/n>info->maxerr)return(0);
564if(mse/n>info->maxerr)return(1);
565return(0);
566 }
567568staticintpost_Y(int *A,int *B,int pos){
569if(A[pos]<0)
570return B[pos];
571if(B[pos]<0)
^ Logic error: The left operand of '<' is a garbage value
572return A[pos];
573574return (A[pos]+B[pos])>>1;
575 }
576577int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look,
578constfloat *logmdct, /* in */579constfloat *logmask){
580long i,j;
581 vorbis_info_floor1 *info=look->vi;
582long n=look->n;
583long posts=look->posts;
584long nonzero=0;
585 lsfit_acc fits[VIF_POSIT+1];
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c591int *output=NULL;
592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is >= 'posts'
libvorbis/lib/floor1.c592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Assuming 'i' is >= 'posts'596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c592int memo[VIF_POSIT+2];
593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Loop body executed 0 times
596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c593594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
^ Loop body executed 0 times
597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */599
Loop body executed 0 times
libvorbis/lib/floor1.c594for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */595for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
^ Loop body executed 0 times
598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */599600/* quantize the relevant floor points and collect them into line fitLoop body executed 0 timeslibvorbis/lib/floor1.c 595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */596for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */597for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */598for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
^ Loop body executed 0 times
599600/* quantize the relevant floor points and collect them into line fit 601 structures (one per minimal division) at the same time */
Assuming 'posts' is not equal to 0
libvorbis/lib/floor1.c599600/* quantize the relevant floor points and collect them into line fit 601 structures (one per minimal division) at the same time */602if(posts==0){
^ Assuming 'posts' is not equal to 0603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
Entering loop body
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Entering loop body
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Entering loop body
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c602if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Assuming 'nonzero' is not equal to 0
libvorbis/lib/floor1.c608 n,info);
609 }
610611if(nonzero){
^ Assuming 'nonzero' is not equal to 0612/* start by fitting the implicit base case.... */613inty0=-200;
614inty1=-200;
Entering loop body
libvorbis/lib/floor1.c623/* start progressive splitting. This is a greedy, non-optimal 624 algorithm, but simple and close enough to the best 625 answer. */626for(i=2;i<posts;i++){
^ Entering loop body
627int sortpos=look->reverse_index[i];
628int ln=loneighbor[sortpos];
629int hn=hineighbor[sortpos];
Looping back to the head of the loop
libvorbis/lib/floor1.c623/* start progressive splitting. This is a greedy, non-optimal 624 algorithm, but simple and close enough to the best 625 answer. */626for(i=2;i<posts;i++){
^ Looping back to the head of the loop
627int sortpos=look->reverse_index[i];
628int ln=loneighbor[sortpos];
629int hn=hineighbor[sortpos];
Calling 'post_Y'
libvorbis/lib/floor1.c700701 output=_vorbis_block_alloc(vb,sizeof(*output)*posts);
702703 output[0]=post_Y(fit_valueA,fit_valueB,0);
^ Calling 'post_Y'704 output[1]=post_Y(fit_valueA,fit_valueB,1);
705706/* fill in posts marked as not using a fit; we will zeroEntered call from 'floor1_fit'libvorbis/lib/floor1.c 565 return(0); 566 } 567 568 static int post_Y(int *A,int *B,int pos){ ^ Entered call from 'floor1_fit' 569 if(A[pos]<0) 570 return B[pos]; 571 if(B[pos]<0)Returning from 'post_Y'libvorbis/lib/floor1.c 700 701 output=_vorbis_block_alloc(vb,sizeof(*output)*posts); 702 703 output[0]=post_Y(fit_valueA,fit_valueB,0); ^ Returning from 'post_Y' 704 output[1]=post_Y(fit_valueA,fit_valueB,1); 705 706 /* fill in posts marked as not using a fit; we will zeroCalling 'post_Y'libvorbis/lib/floor1.c 701 output=_vorbis_block_alloc(vb,sizeof(*output)*posts); 702 703 output[0]=post_Y(fit_valueA,fit_valueB,0); 704 output[1]=post_Y(fit_valueA,fit_valueB,1); ^ Calling 'post_Y' 705 706 /* fill in posts marked as not using a fit; we will zero 707 back out to 'unused' when encoding them so long as curveEntered call from 'floor1_fit'libvorbis/lib/floor1.c 565 return(0); 566 } 567 568 static int post_Y(int *A,int *B,int pos){ ^ Entered call from 'floor1_fit' 569 if(A[pos]<0) 570 return B[pos]; 571 if(B[pos]<0)Returning from 'post_Y'libvorbis/lib/floor1.c 701 output=_vorbis_block_alloc(vb,sizeof(*output)*posts); 702 703 output[0]=post_Y(fit_valueA,fit_valueB,0); 704 output[1]=post_Y(fit_valueA,fit_valueB,1); ^ Returning from 'post_Y' 705 706 /* fill in posts marked as not using a fit; we will zero 707 back out to 'unused' when encoding them so long as curveEntering loop bodylibvorbis/lib/floor1.c 706 /* fill in posts marked as not using a fit; we will zero 707 back out to 'unused' when encoding them so long as curve 708 interpolation doesn't force them into use */709for(i=2;i<posts;i++){
^ Entering loop body
710int ln=look->loneighbor[i-2];
711int hn=look->hineighbor[i-2];
712int x0=info->postlist[ln];
Calling 'post_Y'
libvorbis/lib/floor1.c715inty1=output[hn];
716717int predicted=render_point(x0,x1,y0,y1,info->postlist[i]);
718int vx=post_Y(fit_valueA,fit_valueB,i);
^ Calling 'post_Y'719720if(vx>=0 && predicted!=vx){
721 output[i]=vx;
Entered call from 'floor1_fit'
libvorbis/lib/floor1.c565return(0);
566 }
567568staticintpost_Y(int *A,int *B,int pos){
^ Entered call from 'floor1_fit'569if(A[pos]<0)
570return B[pos];
571if(B[pos]<0)
The left operand of '<' is a garbage value
libvorbis/lib/floor1.c568staticintpost_Y(int *A,int *B,int pos){
569if(A[pos]<0)
570return B[pos];
571if(B[pos]<0)
^ The left operand of '<' is a garbage value
572return A[pos];
573574return (A[pos]+B[pos])>>1;
----------
Logic error: The left operand of '*' is a garbage value (libvorbis/lib/lpc.c:79)
libvorbis/lib/lpc.c65double epsilon;
66int i,j;
6768/* autocorrelation, p+1 lag coefficients */69 j=m+1;
70while(j--){
71double d=0; /* double needed for accumulator depth */72for(i=j;i<n;i++)d+=(double)data[i]*data[i-j];
73 aut[j]=d;
74 }
7576/* Generate lpc coefficients from autocorr values */7778/* set our noise floor to about -100dB */79 error=aut[0] * (1. + 1e-10);
^ Logic error: The left operand of '*' is a garbage value
80 epsilon=1e-9*aut[0]+1e-10;
8182for(i=0;i<m;i++){
83double r= -aut[i+1];
8485if(error<epsilon){
86memset(lpc+i,0,(m-i)*sizeof(*lpc));
87goto done;
88 }
8990/* Sum up this iteration's reflection coefficient; note that in 91 Vorbis we don't save it. If anyone wants to recycle this code 92 and needs reflection coefficients, save the results of 'r' from 93 each iteration. */
Loop body executed 0 times
libvorbis/lib/lpc.c6768/* autocorrelation, p+1 lag coefficients */69 j=m+1;
70while(j--){
^ Loop body executed 0 times
71double d=0; /* double needed for accumulator depth */72for(i=j;i<n;i++)d+=(double)data[i]*data[i-j];
73 aut[j]=d;
The left operand of '*' is a garbage value
libvorbis/lib/lpc.c76/* Generate lpc coefficients from autocorr values */7778/* set our noise floor to about -100dB */79 error=aut[0] * (1. + 1e-10);
^ The left operand of '*' is a garbage value
80 epsilon=1e-9*aut[0]+1e-10;
8182for(i=0;i<m;i++){
----------
Logic error: The left operand of '<=' is a garbage value (libvorbis/lib/sharedbook.c:394)
libvorbis/lib/sharedbook.c380 unmodified decode paths. */381 c->dec_firsttablen=1;
382 c->dec_firsttable=_ogg_calloc(2,sizeof(*c->dec_firsttable));
383 c->dec_firsttable[0]=c->dec_firsttable[1]=1;
384385 }else{
386 c->dec_firsttablen=ov_ilog(c->used_entries)-4; /* this is magic */387if(c->dec_firsttablen<5)c->dec_firsttablen=5;
388if(c->dec_firsttablen>8)c->dec_firsttablen=8;
389390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
^ Logic error: The left operand of '<=' is a garbage value
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
398 }
399 }
400401/* now fill in 'unused' entries in the firsttable with hi/lo search 402 hints for the non-direct-hits */403 {
404ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405long lo=0,hi=0;
406407for(i=0;i<tabn;i++){
408ogg_uint32_t word=i<<(32-c->dec_firsttablen);
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c322 c->used_entries=n;
323 c->dim=s->dim;
324325if(n>0){
^ Assuming 'n' is > 0326/* two different remappings go on here. 327 328 First, we collapse the likely sparse codebook down only toAssuming 'codes' is not equal to nulllibvorbis/lib/sharedbook.c 337 ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries); 338 ogg_uint32_t **codep=alloca(sizeof(*codep)*n); 339 340 if(codes==NULL)goto err_out; ^ Assuming 'codes' is not equal to null 341 342 for(i=0;i<n;i++){ 343 codes[i]=bitreverse(codes[i]);Entering loop bodylibvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Entering loop body 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Looping back to the head of the looplibvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Looping back to the head of the loop 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Assuming 'i' is >= 'n'libvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Assuming 'i' is >= 'n' 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Entering loop bodylibvorbis/lib/sharedbook.c 349 sortindex=alloca(n*sizeof(*sortindex)); 350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist)); 351 /* the index is a reverse index */352for(i=0;i<n;i++){
^ Entering loop body
353int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351/* the index is a reverse index */352for(i=0;i<n;i++){
^ Looping back to the head of the loop
353int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c354 sortindex[position]=i;
355 }
356357for(i=0;i<n;i++)
^ Entering loop body
358 c->codelist[sortindex[i]]=codes[i];
359_ogg_free(codes);
360
Looping back to the head of the loop
libvorbis/lib/sharedbook.c354 sortindex[position]=i;
355 }
356357for(i=0;i<n;i++)
^ Looping back to the head of the loop
358 c->codelist[sortindex[i]]=codes[i];
359_ogg_free(codes);
360
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is not equal to 1
libvorbis/lib/sharedbook.c374 c->dec_maxlength=s->lengthlist[i];
375 }
376377if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is not equal to 1378/* special case the 'single entry codebook' with a single bit 379 fastpath table (that always returns entry 0 )in order to use 380 unmodified decode paths. */
Assuming 'i' is < 'n'
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Assuming 'i' is < 'n'394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Entering loop body
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
The left operand of '<=' is a garbage value
libvorbis/lib/sharedbook.c391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
^ The left operand of '<=' is a garbage value
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
----------
Logic error: Function call argument is an uninitialized value (libvorbis/lib/sharedbook.c:395)
libvorbis/lib/sharedbook.c381 c->dec_firsttablen=1;
382 c->dec_firsttable=_ogg_calloc(2,sizeof(*c->dec_firsttable));
383 c->dec_firsttable[0]=c->dec_firsttable[1]=1;
384385 }else{
386 c->dec_firsttablen=ov_ilog(c->used_entries)-4; /* this is magic */387if(c->dec_firsttablen<5)c->dec_firsttablen=5;
388if(c->dec_firsttablen>8)c->dec_firsttablen=8;
389390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
^ Logic error: Function call argument is an uninitialized value
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
398 }
399 }
400401/* now fill in 'unused' entries in the firsttable with hi/lo search 402 hints for the non-direct-hits */403 {
404ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405long lo=0,hi=0;
406407for(i=0;i<tabn;i++){
408ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409if(c->dec_firsttable[bitreverse(word)]==0){
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c322 c->used_entries=n;
323 c->dim=s->dim;
324325if(n>0){
^ Assuming 'n' is > 0326/* two different remappings go on here. 327 328 First, we collapse the likely sparse codebook down only toAssuming 'codes' is not equal to nulllibvorbis/lib/sharedbook.c 337 ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries); 338 ogg_uint32_t **codep=alloca(sizeof(*codep)*n); 339 340 if(codes==NULL)goto err_out; ^ Assuming 'codes' is not equal to null 341 342 for(i=0;i<n;i++){ 343 codes[i]=bitreverse(codes[i]);Entering loop bodylibvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Entering loop body 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Looping back to the head of the looplibvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Looping back to the head of the loop 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Assuming 'i' is >= 'n'libvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Assuming 'i' is >= 'n' 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Entering loop bodylibvorbis/lib/sharedbook.c 349 sortindex=alloca(n*sizeof(*sortindex)); 350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist)); 351 /* the index is a reverse index */352for(i=0;i<n;i++){
^ Entering loop body
353int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351/* the index is a reverse index */352for(i=0;i<n;i++){
^ Looping back to the head of the loop
353int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c354 sortindex[position]=i;
355 }
356357for(i=0;i<n;i++)
^ Entering loop body
358 c->codelist[sortindex[i]]=codes[i];
359_ogg_free(codes);
360
Looping back to the head of the loop
libvorbis/lib/sharedbook.c354 sortindex[position]=i;
355 }
356357for(i=0;i<n;i++)
^ Looping back to the head of the loop
358 c->codelist[sortindex[i]]=codes[i];
359_ogg_free(codes);
360
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is not equal to 1
libvorbis/lib/sharedbook.c374 c->dec_maxlength=s->lengthlist[i];
375 }
376377if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is not equal to 1378/* special case the 'single entry codebook' with a single bit 379 fastpath table (that always returns entry 0 )in order to use 380 unmodified decode paths. */
Assuming 'i' is < 'n'
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Assuming 'i' is < 'n'394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Entering loop body
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Function call argument is an uninitialized value
libvorbis/lib/sharedbook.c392393for(i=0;i<n;i++){
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
^ Function call argument is an uninitialized value
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
398 }
----------
Logic error: The left operand of '<=' is a garbage value (libvorbis/lib/sharedbook.c:410)
libvorbis/lib/sharedbook.c396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
398 }
399 }
400401/* now fill in 'unused' entries in the firsttable with hi/lo search 402 hints for the non-direct-hits */403 {
404ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405long lo=0,hi=0;
406407for(i=0;i<tabn;i++){
408ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409if(c->dec_firsttable[bitreverse(word)]==0){
410while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
^ Logic error: The left operand of '<=' is a garbage value
411while( hi<n && word>=(c->codelist[hi]&mask))hi++;
412413/* we only actually have 15 bits per hint to play with here. 414 In order to overflow gracefully (nothing breaks, efficiency 415 just drops), encode as the difference from the extremes. */416 {
417unsignedlong loval=lo;
418unsignedlong hival=n-hi;
419420if(loval>0x7fff)loval=0x7fff;
421if(hival>0x7fff)hival=0x7fff;
422 c->dec_firsttable[bitreverse(word)]=
4230x80000000UL | (loval<<15) | hival;
424 }
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c322 c->used_entries=n;
323 c->dim=s->dim;
324325if(n>0){
^ Assuming 'n' is > 0326/* two different remappings go on here. 327 328 First, we collapse the likely sparse codebook down only toAssuming 'codes' is not equal to nulllibvorbis/lib/sharedbook.c 337 ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries); 338 ogg_uint32_t **codep=alloca(sizeof(*codep)*n); 339 340 if(codes==NULL)goto err_out; ^ Assuming 'codes' is not equal to null 341 342 for(i=0;i<n;i++){ 343 codes[i]=bitreverse(codes[i]);Entering loop bodylibvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Entering loop body 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Looping back to the head of the looplibvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Looping back to the head of the loop 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Assuming 'i' is >= 'n'libvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Assuming 'i' is >= 'n' 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Entering loop bodylibvorbis/lib/sharedbook.c 349 sortindex=alloca(n*sizeof(*sortindex)); 350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist)); 351 /* the index is a reverse index */352for(i=0;i<n;i++){
^ Entering loop body
353int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351/* the index is a reverse index */352for(i=0;i<n;i++){
^ Looping back to the head of the loop
353int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c354 sortindex[position]=i;
355 }
356357for(i=0;i<n;i++)
^ Entering loop body
358 c->codelist[sortindex[i]]=codes[i];
359_ogg_free(codes);
360
Looping back to the head of the loop
libvorbis/lib/sharedbook.c354 sortindex[position]=i;
355 }
356357for(i=0;i<n;i++)
^ Looping back to the head of the loop
358 c->codelist[sortindex[i]]=codes[i];
359_ogg_free(codes);
360
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is not equal to 1
libvorbis/lib/sharedbook.c374 c->dec_maxlength=s->lengthlist[i];
375 }
376377if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is not equal to 1378/* special case the 'single entry codebook' with a single bit 379 fastpath table (that always returns entry 0 )in order to use 380 unmodified decode paths. */
Assuming 'i' is < 'n'
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Assuming 'i' is < 'n'394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Entering loop body
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Looping back to the head of the loop
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Entering loop body
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Looping back to the head of the loop
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Assuming 'i' is >= 'n'
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Assuming 'i' is >= 'n'394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c404ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405long lo=0,hi=0;
406407for(i=0;i<tabn;i++){
^ Entering loop body
408ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409if(c->dec_firsttable[bitreverse(word)]==0){
410while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
The left operand of '<=' is a garbage value
libvorbis/lib/sharedbook.c407for(i=0;i<tabn;i++){
408ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409if(c->dec_firsttable[bitreverse(word)]==0){
410while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
^ The left operand of '<=' is a garbage value
411while( hi<n && word>=(c->codelist[hi]&mask))hi++;
412413/* we only actually have 15 bits per hint to play with here.Event 100: Logic error: The left operand of '&' is a garbage value (libvorbis/lib/sharedbook.c:411)libvorbis/lib/sharedbook.c 397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1; 398 } 399 } 400 401 /* now fill in 'unused' entries in the firsttable with hi/lo search 402 hints for the non-direct-hits */403 {
404ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405long lo=0,hi=0;
406407for(i=0;i<tabn;i++){
408ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409if(c->dec_firsttable[bitreverse(word)]==0){
410while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
411while( hi<n && word>=(c->codelist[hi]&mask))hi++;
^ Logic error: The left operand of '&' is a garbage value
412413/* we only actually have 15 bits per hint to play with here. 414 In order to overflow gracefully (nothing breaks, efficiency 415 just drops), encode as the difference from the extremes. */416 {
417unsignedlong loval=lo;
418unsignedlong hival=n-hi;
419420if(loval>0x7fff)loval=0x7fff;
421if(hival>0x7fff)hival=0x7fff;
422 c->dec_firsttable[bitreverse(word)]=
4230x80000000UL | (loval<<15) | hival;
424 }
425 }
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Entering loop body
318if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c314memset(c,0,sizeof(*c));
315316/* count actually used entries and find max length */317for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c322 c->used_entries=n;
323 c->dim=s->dim;
324325if(n>0){
^ Assuming 'n' is > 0326/* two different remappings go on here. 327 328 First, we collapse the likely sparse codebook down only toAssuming 'codes' is not equal to nulllibvorbis/lib/sharedbook.c 337 ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries); 338 ogg_uint32_t **codep=alloca(sizeof(*codep)*n); 339 340 if(codes==NULL)goto err_out; ^ Assuming 'codes' is not equal to null 341 342 for(i=0;i<n;i++){ 343 codes[i]=bitreverse(codes[i]);Entering loop bodylibvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Entering loop body 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Looping back to the head of the looplibvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Looping back to the head of the loop 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Assuming 'i' is >= 'n'libvorbis/lib/sharedbook.c 339 340 if(codes==NULL)goto err_out; 341 342 for(i=0;i<n;i++){ ^ Assuming 'i' is >= 'n' 343 codes[i]=bitreverse(codes[i]); 344 codep[i]=codes+i; 345 }Entering loop bodylibvorbis/lib/sharedbook.c 349 sortindex=alloca(n*sizeof(*sortindex)); 350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist)); 351 /* the index is a reverse index */352for(i=0;i<n;i++){
^ Entering loop body
353int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351/* the index is a reverse index */352for(i=0;i<n;i++){
^ Looping back to the head of the loop
353int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c354 sortindex[position]=i;
355 }
356357for(i=0;i<n;i++)
^ Entering loop body
358 c->codelist[sortindex[i]]=codes[i];
359_ogg_free(codes);
360
Looping back to the head of the loop
libvorbis/lib/sharedbook.c354 sortindex[position]=i;
355 }
356357for(i=0;i<n;i++)
^ Looping back to the head of the loop
358 c->codelist[sortindex[i]]=codes[i];
359_ogg_free(codes);
360
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363364for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c367368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is equal to 1
libvorbis/lib/sharedbook.c374 c->dec_maxlength=s->lengthlist[i];
375 }
376377if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is equal to 1378/* special case the 'single entry codebook' with a single bit 379 fastpath table (that always returns entry 0 )in order to use 380 unmodified decode paths. */
Entering loop body
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Entering loop body
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392393for(i=0;i<n;i++){
^ Looping back to the head of the loop
394if(c->dec_codelengths[i]<=c->dec_firsttablen){
395ogg_uint32_t orig=bitreverse(c->codelist[i]);
396for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c404ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405long lo=0,hi=0;
406407for(i=0;i<tabn;i++){
^ Entering loop body
408ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409if(c->dec_firsttable[bitreverse(word)]==0){
410while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
The left operand of '&' is a garbage value
libvorbis/lib/sharedbook.c408ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409if(c->dec_firsttable[bitreverse(word)]==0){
410while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
411while( hi<n && word>=(c->codelist[hi]&mask))hi++;
^ The left operand of '&' is a garbage value
412413/* we only actually have 15 bits per hint to play with here. 414 In order to overflow gracefully (nothing breaks, efficiencyEvent 101: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2015)libvorbis/lib/vorbisfile.c 2001 2002 /* a tight loop to pack each size */2003 {
2004int val;
2005if(word==1){
2006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
2009for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011if(val>127)val=127;
2012elseif(val<-128)val=-128;
2013 *buffer++=val+off;
2014 }
2015vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2016 }else{
2017int off=(sgned?0:32768);
20182019if(host_endian==bigendianp){
2020if(sgned){
20212022vorbis_fpu_setround(&fpu);
2023for(i=0;i<channels;i++) { /* It's faster in this order */2024float *src=pcm[i];
2025short *dest=((short *)buffer)+i;
2026for(j=0;j<samples;j++) {
2027 val=vorbis_ftoi(src[j]*32768.f);
2028if(val>32767)val=32767;
2029elseif(val<-32768)val=-32768;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c1969while(1){
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
^ Assuming 'samples' is not equal to 01973 }
19741975/* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c19831984 }
19851986if(samples>0){
^ Assuming 'samples' is > 019871988/* yay! proceed to pack data into the byte buffer */1989'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c19891990long channels=ov_info(vf,-1)->channels;
1991long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993if(samples>length/bytespersample)samples=length/bytespersample;
19941995if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c1996return OV_EINVAL;
19971998/* Here. */1999if(filter)
^ Assuming 'filter' is null
2000filter(pcm,channels,samples,filter_param);
20012002/* a tight loop to pack each size */
Assuming 'word' is equal to 1
libvorbis/lib/vorbisfile.c2002/* a tight loop to pack each size */2003 {
2004int val;
2005if(word==1){
^ Assuming 'word' is equal to 12006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c2003 {
2004int val;
2005if(word==1){
2006int off=(sgned?0:128);
^ Assuming 'sgned' is 02007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
2009for(i=0;i<channels;i++){
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c2004int val;
2005if(word==1){
2006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'2008for(j=0;j<samples;j++)
2009for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
Entered call from 'ov_read_filter'
libvorbis/lib/os.h158return_mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160161static __inline voidvorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c2004int val;
2005if(word==1){
2006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'2008for(j=0;j<samples;j++)
2009for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
Entering loop body
libvorbis/lib/vorbisfile.c2005if(word==1){
2006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
^ Entering loop body
2009for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011if(val>127)val=127;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c2006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
2009for(i=0;i<channels;i++){
^ Assuming 'i' is >= 'channels'2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011if(val>127)val=127;
2012elseif(val<-128)val=-128;
Loop body executed 0 times
libvorbis/lib/vorbisfile.c2006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
2009for(i=0;i<channels;i++){
^ Loop body executed 0 times
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011if(val>127)val=127;
2012elseif(val<-128)val=-128;
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c2005if(word==1){
2006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
^ Looping back to the head of the loop
2009for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011if(val>127)val=127;
Assuming 'j' is >= 'samples'
libvorbis/lib/vorbisfile.c2005if(word==1){
2006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
^ Assuming 'j' is >= 'samples'2009for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011if(val>127)val=127;
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c2012elseif(val<-128)val=-128;
2013 *buffer++=val+off;
2014 }
2015vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2016 }else{
2017int off=(sgned?0:32768);
2018
Event 102: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2034)
libvorbis/lib/vorbisfile.c2020if(sgned){
20212022vorbis_fpu_setround(&fpu);
2023for(i=0;i<channels;i++) { /* It's faster in this order */2024float *src=pcm[i];
2025short *dest=((short *)buffer)+i;
2026for(j=0;j<samples;j++) {
2027 val=vorbis_ftoi(src[j]*32768.f);
2028if(val>32767)val=32767;
2029elseif(val<-32768)val=-32768;
2030 *dest=val;
2031 dest+=channels;
2032 }
2033 }
2034vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
20352036 }else{
20372038vorbis_fpu_setround(&fpu);
2039for(i=0;i<channels;i++) {
2040float *src=pcm[i];
2041short *dest=((short *)buffer)+i;
2042for(j=0;j<samples;j++) {
2043 val=vorbis_ftoi(src[j]*32768.f);
2044if(val>32767)val=32767;
2045elseif(val<-32768)val=-32768;
2046 *dest=val+off;
2047 dest+=channels;
2048 }
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c1969while(1){
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
^ Assuming 'samples' is not equal to 01973 }
19741975/* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c19831984 }
19851986if(samples>0){
^ Assuming 'samples' is > 019871988/* yay! proceed to pack data into the byte buffer */1989'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c19891990long channels=ov_info(vf,-1)->channels;
1991long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993if(samples>length/bytespersample)samples=length/bytespersample;
19941995if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c1996return OV_EINVAL;
19971998/* Here. */1999if(filter)
^ Assuming 'filter' is null
2000filter(pcm,channels,samples,filter_param);
20012002/* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c2002/* a tight loop to pack each size */2003 {
2004int val;
2005if(word==1){
^ Assuming 'word' is not equal to 12006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
Assuming 'sgned' is not equal to 0
libvorbis/lib/vorbisfile.c2014 }
2015vorbis_fpu_restore(fpu);
2016 }else{
2017int off=(sgned?0:32768);
^ Assuming 'sgned' is not equal to 020182019if(host_endian==bigendianp){
2020if(sgned){
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c2019if(host_endian==bigendianp){
2020if(sgned){
20212022vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'2023for(i=0;i<channels;i++) { /* It's faster in this order */2024float *src=pcm[i];
2025short *dest=((short *)buffer)+i;
Entered call from 'ov_read_filter'
libvorbis/lib/os.h158return_mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160161static __inline voidvorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c2019if(host_endian==bigendianp){
2020if(sgned){
20212022vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'2023for(i=0;i<channels;i++) { /* It's faster in this order */2024float *src=pcm[i];
2025short *dest=((short *)buffer)+i;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c2020if(sgned){
20212022vorbis_fpu_setround(&fpu);
2023for(i=0;i<channels;i++) { /* It's faster in this order */
^ Assuming 'i' is >= 'channels'2024float *src=pcm[i];
2025short *dest=((short *)buffer)+i;
2026for(j=0;j<samples;j++) {
Loop body executed 0 times
libvorbis/lib/vorbisfile.c2020if(sgned){
20212022vorbis_fpu_setround(&fpu);
2023for(i=0;i<channels;i++) { /* It's faster in this order */
^ Loop body executed 0 times
2024float *src=pcm[i];
2025short *dest=((short *)buffer)+i;
2026for(j=0;j<samples;j++) {
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c2031 dest+=channels;
2032 }
2033 }
2034vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
20352036 }else{
2037
Event 103: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2050)
libvorbis/lib/vorbisfile.c2036 }else{
20372038vorbis_fpu_setround(&fpu);
2039for(i=0;i<channels;i++) {
2040float *src=pcm[i];
2041short *dest=((short *)buffer)+i;
2042for(j=0;j<samples;j++) {
2043 val=vorbis_ftoi(src[j]*32768.f);
2044if(val>32767)val=32767;
2045elseif(val<-32768)val=-32768;
2046 *dest=val+off;
2047 dest+=channels;
2048 }
2049 }
2050vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
20512052 }
2053 }elseif(bigendianp){
20542055vorbis_fpu_setround(&fpu);
2056for(j=0;j<samples;j++)
2057for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059if(val>32767)val=32767;
2060elseif(val<-32768)val=-32768;
2061 val+=off;
2062 *buffer++=(val>>8);
2063 *buffer++=(val&0xff);
2064 }
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c1969while(1){
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
^ Assuming 'samples' is not equal to 01973 }
19741975/* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c19831984 }
19851986if(samples>0){
^ Assuming 'samples' is > 019871988/* yay! proceed to pack data into the byte buffer */1989'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c19891990long channels=ov_info(vf,-1)->channels;
1991long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993if(samples>length/bytespersample)samples=length/bytespersample;
19941995if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c1996return OV_EINVAL;
19971998/* Here. */1999if(filter)
^ Assuming 'filter' is null
2000filter(pcm,channels,samples,filter_param);
20012002/* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c2002/* a tight loop to pack each size */2003 {
2004int val;
2005if(word==1){
^ Assuming 'word' is not equal to 12006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c2014 }
2015vorbis_fpu_restore(fpu);
2016 }else{
2017int off=(sgned?0:32768);
^ Assuming 'sgned' is 020182019if(host_endian==bigendianp){
2020if(sgned){
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c20352036 }else{
20372038vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'2039for(i=0;i<channels;i++) {
2040float *src=pcm[i];
2041short *dest=((short *)buffer)+i;
Entered call from 'ov_read_filter'
libvorbis/lib/os.h158return_mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160161static __inline voidvorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c20352036 }else{
20372038vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'2039for(i=0;i<channels;i++) {
2040float *src=pcm[i];
2041short *dest=((short *)buffer)+i;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c2036 }else{
20372038vorbis_fpu_setround(&fpu);
2039for(i=0;i<channels;i++) {
^ Assuming 'i' is >= 'channels'2040float *src=pcm[i];
2041short *dest=((short *)buffer)+i;
2042for(j=0;j<samples;j++) {
Loop body executed 0 times
libvorbis/lib/vorbisfile.c2036 }else{
20372038vorbis_fpu_setround(&fpu);
2039for(i=0;i<channels;i++) {
^ Loop body executed 0 times
2040float *src=pcm[i];
2041short *dest=((short *)buffer)+i;
2042for(j=0;j<samples;j++) {
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c2047 dest+=channels;
2048 }
2049 }
2050vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
20512052 }
2053 }elseif(bigendianp){
Event 104: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2065)
libvorbis/lib/vorbisfile.c20512052 }
2053 }elseif(bigendianp){
20542055vorbis_fpu_setround(&fpu);
2056for(j=0;j<samples;j++)
2057for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059if(val>32767)val=32767;
2060elseif(val<-32768)val=-32768;
2061 val+=off;
2062 *buffer++=(val>>8);
2063 *buffer++=(val&0xff);
2064 }
2065vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
20662067 }else{
2068int val;
2069vorbis_fpu_setround(&fpu);
2070for(j=0;j<samples;j++)
2071for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073if(val>32767)val=32767;
2074elseif(val<-32768)val=-32768;
2075 val+=off;
2076 *buffer++=(val&0xff);
2077 *buffer++=(val>>8);
2078 }
2079vorbis_fpu_restore(fpu);
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c1969while(1){
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
^ Assuming 'samples' is not equal to 01973 }
19741975/* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c19831984 }
19851986if(samples>0){
^ Assuming 'samples' is > 019871988/* yay! proceed to pack data into the byte buffer */1989'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c19891990long channels=ov_info(vf,-1)->channels;
1991long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993if(samples>length/bytespersample)samples=length/bytespersample;
19941995if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c1996return OV_EINVAL;
19971998/* Here. */1999if(filter)
^ Assuming 'filter' is null
2000filter(pcm,channels,samples,filter_param);
20012002/* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c2002/* a tight loop to pack each size */2003 {
2004int val;
2005if(word==1){
^ Assuming 'word' is not equal to 12006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c2014 }
2015vorbis_fpu_restore(fpu);
2016 }else{
2017int off=(sgned?0:32768);
^ Assuming 'sgned' is 020182019if(host_endian==bigendianp){
2020if(sgned){
Assuming 'bigendianp' is not equal to 0
libvorbis/lib/vorbisfile.c2050vorbis_fpu_restore(fpu);
20512052 }
2053 }elseif(bigendianp){
^ Assuming 'bigendianp' is not equal to 020542055vorbis_fpu_setround(&fpu);
2056for(j=0;j<samples;j++)
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c2052 }
2053 }elseif(bigendianp){
20542055vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'2056for(j=0;j<samples;j++)
2057for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entered call from 'ov_read_filter'
libvorbis/lib/os.h158return_mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160161static __inline voidvorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c2052 }
2053 }elseif(bigendianp){
20542055vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'2056for(j=0;j<samples;j++)
2057for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entering loop body
libvorbis/lib/vorbisfile.c2053 }elseif(bigendianp){
20542055vorbis_fpu_setround(&fpu);
2056for(j=0;j<samples;j++)
^ Entering loop body
2057for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059if(val>32767)val=32767;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c20542055vorbis_fpu_setround(&fpu);
2056for(j=0;j<samples;j++)
2057for(i=0;i<channels;i++){
^ Assuming 'i' is >= 'channels'2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059if(val>32767)val=32767;
2060elseif(val<-32768)val=-32768;
Loop body executed 0 times
libvorbis/lib/vorbisfile.c20542055vorbis_fpu_setround(&fpu);
2056for(j=0;j<samples;j++)
2057for(i=0;i<channels;i++){
^ Loop body executed 0 times
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059if(val>32767)val=32767;
2060elseif(val<-32768)val=-32768;
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c2053 }elseif(bigendianp){
20542055vorbis_fpu_setround(&fpu);
2056for(j=0;j<samples;j++)
^ Looping back to the head of the loop
2057for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059if(val>32767)val=32767;
Assuming 'j' is >= 'samples'
libvorbis/lib/vorbisfile.c2053 }elseif(bigendianp){
20542055vorbis_fpu_setround(&fpu);
2056for(j=0;j<samples;j++)
^ Assuming 'j' is >= 'samples'2057for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059if(val>32767)val=32767;
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c2062 *buffer++=(val>>8);
2063 *buffer++=(val&0xff);
2064 }
2065vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
20662067 }else{
2068int val;
Event 105: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2079)
libvorbis/lib/vorbisfile.c2065vorbis_fpu_restore(fpu);
20662067 }else{
2068int val;
2069vorbis_fpu_setround(&fpu);
2070for(j=0;j<samples;j++)
2071for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073if(val>32767)val=32767;
2074elseif(val<-32768)val=-32768;
2075 val+=off;
2076 *buffer++=(val&0xff);
2077 *buffer++=(val>>8);
2078 }
2079vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
20802081 }
2082 }
2083 }
20842085vorbis_synthesis_read(&vf->vd,samples);
2086 hs=vorbis_synthesis_halfrate_p(vf->vi);
2087 vf->pcm_offset+=(samples<<hs);
2088if(bitstream)*bitstream=vf->current_link;
2089return(samples*bytespersample);
2090 }else{
2091return(samples);
2092 }
2093 }
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c1977int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978if(ret==OV_EOF)
1979return(0);
1980if(ret<=0)
^ Assuming 'ret' is > 01981return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Looping back to the head of the loop
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c19661967if(vf->ready_state<OPENED)return(OV_EINVAL);
19681969while(1){
^ Entering loop body
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c1969while(1){
1970if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972if(samples)break;
^ Assuming 'samples' is not equal to 01973 }
19741975/* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c19831984 }
19851986if(samples>0){
^ Assuming 'samples' is > 019871988/* yay! proceed to pack data into the byte buffer */1989'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c19891990long channels=ov_info(vf,-1)->channels;
1991long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993if(samples>length/bytespersample)samples=length/bytespersample;
19941995if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c1996return OV_EINVAL;
19971998/* Here. */1999if(filter)
^ Assuming 'filter' is null
2000filter(pcm,channels,samples,filter_param);
20012002/* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c2002/* a tight loop to pack each size */2003 {
2004int val;
2005if(word==1){
^ Assuming 'word' is not equal to 12006int off=(sgned?0:128);
2007vorbis_fpu_setround(&fpu);
2008for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c2014 }
2015vorbis_fpu_restore(fpu);
2016 }else{
2017int off=(sgned?0:32768);
^ Assuming 'sgned' is 020182019if(host_endian==bigendianp){
2020if(sgned){
Assuming 'bigendianp' is 0
libvorbis/lib/vorbisfile.c2050vorbis_fpu_restore(fpu);
20512052 }
2053 }elseif(bigendianp){
^ Assuming 'bigendianp' is 020542055vorbis_fpu_setround(&fpu);
2056for(j=0;j<samples;j++)
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c20662067 }else{
2068int val;
2069vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'2070for(j=0;j<samples;j++)
2071for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entered call from 'ov_read_filter'
libvorbis/lib/os.h158return_mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160161static __inline voidvorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c20662067 }else{
2068int val;
2069vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'2070for(j=0;j<samples;j++)
2071for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entering loop body
libvorbis/lib/vorbisfile.c2067 }else{
2068int val;
2069vorbis_fpu_setround(&fpu);
2070for(j=0;j<samples;j++)
^ Entering loop body
2071for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073if(val>32767)val=32767;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c2068int val;
2069vorbis_fpu_setround(&fpu);
2070for(j=0;j<samples;j++)
2071for(i=0;i<channels;i++){
^ Assuming 'i' is >= 'channels'2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073if(val>32767)val=32767;
2074elseif(val<-32768)val=-32768;
Loop body executed 0 times
libvorbis/lib/vorbisfile.c2068int val;
2069vorbis_fpu_setround(&fpu);
2070for(j=0;j<samples;j++)
2071for(i=0;i<channels;i++){
^ Loop body executed 0 times
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073if(val>32767)val=32767;
2074elseif(val<-32768)val=-32768;
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c2067 }else{
2068int val;
2069vorbis_fpu_setround(&fpu);
2070for(j=0;j<samples;j++)
^ Looping back to the head of the loop
2071for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073if(val>32767)val=32767;
Assuming 'j' is >= 'samples'
libvorbis/lib/vorbisfile.c2067 }else{
2068int val;
2069vorbis_fpu_setround(&fpu);
2070for(j=0;j<samples;j++)
^ Assuming 'j' is >= 'samples'2071for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073if(val>32767)val=32767;
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c2076 *buffer++=(val&0xff);
2077 *buffer++=(val>>8);
2078 }
2079vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
20802081 }
2082 }
Probably some of these would not actually happen in the real world, but it might be worth addressing them all anyway.
Thanks,
Benbuck
The text was updated successfully, but these errors were encountered:
Hi,
I ran the clang static analyzer on vorbis 1.3.5 and it reported these potential issues:
Probably some of these would not actually happen in the real world, but it might be worth addressing them all anyway.
Thanks,
Benbuck
The text was updated successfully, but these errors were encountered: