vorbis
vorbis copied to clipboard
Potential issues reported by clang static analyzer
Hi,
I ran the clang static analyzer on vorbis 1.3.5 and it reported these potential issues:
Logic error: Assigned value is garbage or undefined (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;
453
454 return(na);
455 }
456
457 static int fit_line(lsfit_acc *a,int fits,int *y0,int *y1,
458 vorbis_info_floor1 *info){
459 double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0;
460 int i;
461 int x0=a[0].x0;
^ Logic error: Assigned value is garbage or undefined
462 int x1=a[fits-1].x1;
463
464 for(i=0;i<fits;i++){
465 double weight = (a[i].bn+a[i].an)*info->twofitweight/(a[i].an+1)+1.;
466
467 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 }
474
475 if(*y0>=0){
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(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.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(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.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(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.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is >= 'posts'
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Assuming 'i' is >= 'posts'
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Loop body executed 0 times
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
^ Loop body executed 0 times
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
Loop body executed 0 times
libvorbis/lib/floor1.c
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
^ Loop body executed 0 times
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
600 /* quantize the relevant floor points and collect them into line fit
Loop body executed 0 times
libvorbis/lib/floor1.c
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
^ Loop body executed 0 times
599
600 /* 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.c
599
600 /* quantize the relevant floor points and collect them into line fit
601 structures (one per minimal division) at the same time */
602 if(posts==0){
^ Assuming 'posts' is not equal to 0
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
Loop body executed 0 times
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
608 n,info);
609 }
610
611 if(nonzero){
^ Assuming 'nonzero' is not equal to 0
612 /* start by fitting the implicit base case.... */
613 int y0=-200;
614 int y1=-200;
Calling 'fit_line'
libvorbis/lib/floor1.c
612 /* start by fitting the implicit base case.... */
613 int y0=-200;
614 int y1=-200;
615 fit_line(fits,posts-1,&y0,&y1,info);
^ Calling 'fit_line'
616
617 fit_valueA[0]=y0;
618 fit_valueB[0]=y0;
Entered call from 'floor1_fit'
libvorbis/lib/floor1.c
454 return(na);
455 }
456
457 static int fit_line(lsfit_acc *a,int fits,int *y0,int *y1,
^ Entered call from 'floor1_fit'
458 vorbis_info_floor1 *info){
459 double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0;
460 int i;
Assigned value is garbage or undefined
libvorbis/lib/floor1.c
458 vorbis_info_floor1 *info){
459 double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0;
460 int i;
461 int x0=a[0].x0;
^ Assigned value is garbage or undefined
462 int x1=a[fits-1].x1;
463
464 for(i=0;i<fits;i++){
----------
Logic error: Undefined or garbage value returned to caller (libvorbis/lib/floor1.c:570)
libvorbis/lib/floor1.c
556 if(y+info->maxover<val)return(1);
557 if(y-info->maxunder>val)return(1);
558 }
559 }
560 }
561
562 if(info->maxover*info->maxover/n>info->maxerr)return(0);
563 if(info->maxunder*info->maxunder/n>info->maxerr)return(0);
564 if(mse/n>info->maxerr)return(1);
565 return(0);
566 }
567
568 static int post_Y(int *A,int *B,int pos){
569 if(A[pos]<0)
570 return B[pos];
^ Logic error: Undefined or garbage value returned to caller
571 if(B[pos]<0)
572 return A[pos];
573
574 return (A[pos]+B[pos])>>1;
575 }
576
577 int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look,
578 const float *logmdct, /* in */
579 const float *logmask){
580 long i,j;
581 vorbis_info_floor1 *info=look->vi;
582 long n=look->n;
583 long posts=look->posts;
584 long nonzero=0;
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(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.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(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.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(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.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is >= 'posts'
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Assuming 'i' is >= 'posts'
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Loop body executed 0 times
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
^ Loop body executed 0 times
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
Loop body executed 0 times
libvorbis/lib/floor1.c
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
^ Loop body executed 0 times
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
600 /* quantize the relevant floor points and collect them into line fit
Loop body executed 0 times
libvorbis/lib/floor1.c
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
^ Loop body executed 0 times
599
600 /* 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.c
599
600 /* quantize the relevant floor points and collect them into line fit
601 structures (one per minimal division) at the same time */
602 if(posts==0){
^ Assuming 'posts' is not equal to 0
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
Entering loop body
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
608 n,info);
609 }
610
611 if(nonzero){
^ Assuming 'nonzero' is not equal to 0
612 /* start by fitting the implicit base case.... */
613 int y0=-200;
614 int y1=-200;
Entering loop body
libvorbis/lib/floor1.c
623 /* start progressive splitting. This is a greedy, non-optimal
624 algorithm, but simple and close enough to the best
625 answer. */
626 for(i=2;i<posts;i++){
^ Entering loop body
627 int sortpos=look->reverse_index[i];
628 int ln=loneighbor[sortpos];
629 int hn=hineighbor[sortpos];
Looping back to the head of the loop
libvorbis/lib/floor1.c
623 /* start progressive splitting. This is a greedy, non-optimal
624 algorithm, but simple and close enough to the best
625 answer. */
626 for(i=2;i<posts;i++){
^ Looping back to the head of the loop
627 int sortpos=look->reverse_index[i];
628 int ln=loneighbor[sortpos];
629 int hn=hineighbor[sortpos];
Entering loop body
libvorbis/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 */
709 for(i=2;i<posts;i++){
^ Entering loop body
710 int ln=look->loneighbor[i-2];
711 int hn=look->hineighbor[i-2];
712 int x0=info->postlist[ln];
Calling 'post_Y'
libvorbis/lib/floor1.c
715 int y1=output[hn];
716
717 int predicted=render_point(x0,x1,y0,y1,info->postlist[i]);
718 int vx=post_Y(fit_valueA,fit_valueB,i);
^ Calling 'post_Y'
719
720 if(vx>=0 && predicted!=vx){
721 output[i]=vx;
Entered 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)
Undefined or garbage value returned to caller
libvorbis/lib/floor1.c
567
568 static int post_Y(int *A,int *B,int pos){
569 if(A[pos]<0)
570 return B[pos];
^ Undefined or garbage value returned to caller
571 if(B[pos]<0)
572 return A[pos];
573
----------
Logic error: The left operand of '<' is a garbage value (libvorbis/lib/floor1.c:571)
libvorbis/lib/floor1.c
557 if(y-info->maxunder>val)return(1);
558 }
559 }
560 }
561
562 if(info->maxover*info->maxover/n>info->maxerr)return(0);
563 if(info->maxunder*info->maxunder/n>info->maxerr)return(0);
564 if(mse/n>info->maxerr)return(1);
565 return(0);
566 }
567
568 static int post_Y(int *A,int *B,int pos){
569 if(A[pos]<0)
570 return B[pos];
571 if(B[pos]<0)
^ Logic error: The left operand of '<' is a garbage value
572 return A[pos];
573
574 return (A[pos]+B[pos])>>1;
575 }
576
577 int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look,
578 const float *logmdct, /* in */
579 const float *logmask){
580 long i,j;
581 vorbis_info_floor1 *info=look->vi;
582 long n=look->n;
583 long posts=look->posts;
584 long nonzero=0;
585 lsfit_acc fits[VIF_POSIT+1];
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(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.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(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.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(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.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is >= 'posts'
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Assuming 'i' is >= 'posts'
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Loop body executed 0 times
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
^ Loop body executed 0 times
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
Loop body executed 0 times
libvorbis/lib/floor1.c
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
^ Loop body executed 0 times
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
600 /* quantize the relevant floor points and collect them into line fit
Loop body executed 0 times
libvorbis/lib/floor1.c
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
^ Loop body executed 0 times
599
600 /* 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.c
599
600 /* quantize the relevant floor points and collect them into line fit
601 structures (one per minimal division) at the same time */
602 if(posts==0){
^ Assuming 'posts' is not equal to 0
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
Entering loop body
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(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.c
608 n,info);
609 }
610
611 if(nonzero){
^ Assuming 'nonzero' is not equal to 0
612 /* start by fitting the implicit base case.... */
613 int y0=-200;
614 int y1=-200;
Entering loop body
libvorbis/lib/floor1.c
623 /* start progressive splitting. This is a greedy, non-optimal
624 algorithm, but simple and close enough to the best
625 answer. */
626 for(i=2;i<posts;i++){
^ Entering loop body
627 int sortpos=look->reverse_index[i];
628 int ln=loneighbor[sortpos];
629 int hn=hineighbor[sortpos];
Looping back to the head of the loop
libvorbis/lib/floor1.c
623 /* start progressive splitting. This is a greedy, non-optimal
624 algorithm, but simple and close enough to the best
625 answer. */
626 for(i=2;i<posts;i++){
^ Looping back to the head of the loop
627 int sortpos=look->reverse_index[i];
628 int ln=loneighbor[sortpos];
629 int hn=hineighbor[sortpos];
Calling '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);
^ Calling '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 zero
Entered 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 zero
Calling '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 curve
Entered 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 curve
Entering loop body
libvorbis/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 */
709 for(i=2;i<posts;i++){
^ Entering loop body
710 int ln=look->loneighbor[i-2];
711 int hn=look->hineighbor[i-2];
712 int x0=info->postlist[ln];
Calling 'post_Y'
libvorbis/lib/floor1.c
715 int y1=output[hn];
716
717 int predicted=render_point(x0,x1,y0,y1,info->postlist[i]);
718 int vx=post_Y(fit_valueA,fit_valueB,i);
^ Calling 'post_Y'
719
720 if(vx>=0 && predicted!=vx){
721 output[i]=vx;
Entered 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)
The left operand of '<' is a garbage value
libvorbis/lib/floor1.c
568 static int post_Y(int *A,int *B,int pos){
569 if(A[pos]<0)
570 return B[pos];
571 if(B[pos]<0)
^ The left operand of '<' is a garbage value
572 return A[pos];
573
574 return (A[pos]+B[pos])>>1;
----------
Logic error: The left operand of '*' is a garbage value (libvorbis/lib/lpc.c:79)
libvorbis/lib/lpc.c
65 double epsilon;
66 int i,j;
67
68 /* autocorrelation, p+1 lag coefficients */
69 j=m+1;
70 while(j--){
71 double d=0; /* double needed for accumulator depth */
72 for(i=j;i<n;i++)d+=(double)data[i]*data[i-j];
73 aut[j]=d;
74 }
75
76 /* Generate lpc coefficients from autocorr values */
77
78 /* 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;
81
82 for(i=0;i<m;i++){
83 double r= -aut[i+1];
84
85 if(error<epsilon){
86 memset(lpc+i,0,(m-i)*sizeof(*lpc));
87 goto done;
88 }
89
90 /* 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.c
67
68 /* autocorrelation, p+1 lag coefficients */
69 j=m+1;
70 while(j--){
^ Loop body executed 0 times
71 double d=0; /* double needed for accumulator depth */
72 for(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.c
76 /* Generate lpc coefficients from autocorr values */
77
78 /* 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;
81
82 for(i=0;i<m;i++){
----------
Logic error: The left operand of '<=' is a garbage value (libvorbis/lib/sharedbook.c:394)
libvorbis/lib/sharedbook.c
380 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;
384
385 }else{
386 c->dec_firsttablen=ov_ilog(c->used_entries)-4; /* this is magic */
387 if(c->dec_firsttablen<5)c->dec_firsttablen=5;
388 if(c->dec_firsttablen>8)c->dec_firsttablen=8;
389
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
^ Logic error: The left operand of '<=' is a garbage value
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(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 }
400
401 /* now fill in 'unused' entries in the firsttable with hi/lo search
402 hints for the non-direct-hits */
403 {
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c
322 c->used_entries=n;
323 c->dim=s->dim;
324
325 if(n>0){
^ Assuming 'n' is > 0
326 /* two different remappings go on here.
327
328 First, we collapse the likely sparse codebook down only to
Assuming 'codes' is not equal to null
libvorbis/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 body
libvorbis/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 loop
libvorbis/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 body
libvorbis/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 */
352 for(i=0;i<n;i++){
^ Entering loop body
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/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 */
352 for(i=0;i<n;i++){
^ Looping back to the head of the loop
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(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.c
354 sortindex[position]=i;
355 }
356
357 for(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.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is not equal to 1
libvorbis/lib/sharedbook.c
374 c->dec_maxlength=s->lengthlist[i];
375 }
376
377 if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is not equal to 1
378 /* 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.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Assuming 'i' is < 'n'
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
The left operand of '<=' is a garbage value
libvorbis/lib/sharedbook.c
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
^ The left operand of '<=' is a garbage value
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(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.c
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;
384
385 }else{
386 c->dec_firsttablen=ov_ilog(c->used_entries)-4; /* this is magic */
387 if(c->dec_firsttablen<5)c->dec_firsttablen=5;
388 if(c->dec_firsttablen>8)c->dec_firsttablen=8;
389
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
^ Logic error: Function call argument is an uninitialized value
396 for(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 }
400
401 /* now fill in 'unused' entries in the firsttable with hi/lo search
402 hints for the non-direct-hits */
403 {
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c
322 c->used_entries=n;
323 c->dim=s->dim;
324
325 if(n>0){
^ Assuming 'n' is > 0
326 /* two different remappings go on here.
327
328 First, we collapse the likely sparse codebook down only to
Assuming 'codes' is not equal to null
libvorbis/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 body
libvorbis/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 loop
libvorbis/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 body
libvorbis/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 */
352 for(i=0;i<n;i++){
^ Entering loop body
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/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 */
352 for(i=0;i<n;i++){
^ Looping back to the head of the loop
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(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.c
354 sortindex[position]=i;
355 }
356
357 for(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.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is not equal to 1
libvorbis/lib/sharedbook.c
374 c->dec_maxlength=s->lengthlist[i];
375 }
376
377 if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is not equal to 1
378 /* 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.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Assuming 'i' is < 'n'
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Function call argument is an uninitialized value
libvorbis/lib/sharedbook.c
392
393 for(i=0;i<n;i++){
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
^ Function call argument is an uninitialized value
396 for(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.c
396 for(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 }
400
401 /* now fill in 'unused' entries in the firsttable with hi/lo search
402 hints for the non-direct-hits */
403 {
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
^ Logic error: The left operand of '<=' is a garbage value
411 while( hi<n && word>=(c->codelist[hi]&mask))hi++;
412
413 /* 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 {
417 unsigned long loval=lo;
418 unsigned long hival=n-hi;
419
420 if(loval>0x7fff)loval=0x7fff;
421 if(hival>0x7fff)hival=0x7fff;
422 c->dec_firsttable[bitreverse(word)]=
423 0x80000000UL | (loval<<15) | hival;
424 }
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c
322 c->used_entries=n;
323 c->dim=s->dim;
324
325 if(n>0){
^ Assuming 'n' is > 0
326 /* two different remappings go on here.
327
328 First, we collapse the likely sparse codebook down only to
Assuming 'codes' is not equal to null
libvorbis/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 body
libvorbis/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 loop
libvorbis/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 body
libvorbis/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 */
352 for(i=0;i<n;i++){
^ Entering loop body
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/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 */
352 for(i=0;i<n;i++){
^ Looping back to the head of the loop
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(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.c
354 sortindex[position]=i;
355 }
356
357 for(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.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is not equal to 1
libvorbis/lib/sharedbook.c
374 c->dec_maxlength=s->lengthlist[i];
375 }
376
377 if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is not equal to 1
378 /* 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.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Assuming 'i' is < 'n'
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Looping back to the head of the loop
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Looping back to the head of the loop
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Assuming 'i' is >= 'n'
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Assuming 'i' is >= 'n'
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
^ Entering loop body
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
The left operand of '<=' is a garbage value
libvorbis/lib/sharedbook.c
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
^ The left operand of '<=' is a garbage value
411 while( hi<n && word>=(c->codelist[hi]&mask))hi++;
412
413 /* 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 {
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
411 while( hi<n && word>=(c->codelist[hi]&mask))hi++;
^ Logic error: The left operand of '&' is a garbage value
412
413 /* 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 {
417 unsigned long loval=lo;
418 unsigned long hival=n-hi;
419
420 if(loval>0x7fff)loval=0x7fff;
421 if(hival>0x7fff)hival=0x7fff;
422 c->dec_firsttable[bitreverse(word)]=
423 0x80000000UL | (loval<<15) | hival;
424 }
425 }
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c
322 c->used_entries=n;
323 c->dim=s->dim;
324
325 if(n>0){
^ Assuming 'n' is > 0
326 /* two different remappings go on here.
327
328 First, we collapse the likely sparse codebook down only to
Assuming 'codes' is not equal to null
libvorbis/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 body
libvorbis/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 loop
libvorbis/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 body
libvorbis/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 */
352 for(i=0;i<n;i++){
^ Entering loop body
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/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 */
352 for(i=0;i<n;i++){
^ Looping back to the head of the loop
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(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.c
354 sortindex[position]=i;
355 }
356
357 for(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.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is equal to 1
libvorbis/lib/sharedbook.c
374 c->dec_maxlength=s->lengthlist[i];
375 }
376
377 if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is equal to 1
378 /* 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.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Looping back to the head of the loop
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
^ Entering loop body
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
The left operand of '&' is a garbage value
libvorbis/lib/sharedbook.c
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
411 while( hi<n && word>=(c->codelist[hi]&mask))hi++;
^ The left operand of '&' is a garbage value
412
413 /* we only actually have 15 bits per hint to play with here.
414 In order to overflow gracefully (nothing breaks, efficiency
Event 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 {
2004 int val;
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
2012 else if(val<-128)val=-128;
2013 *buffer++=val+off;
2014 }
2015 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2016 }else{
2017 int off=(sgned?0:32768);
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
2026 for(j=0;j<samples;j++) {
2027 val=vorbis_ftoi(src[j]*32768.f);
2028 if(val>32767)val=32767;
2029 else if(val<-32768)val=-32768;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c
2003 {
2004 int val;
2005 if(word==1){
2006 int off=(sgned?0:128);
^ Assuming 'sgned' is 0
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2004 int val;
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_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.c
2004 int val;
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
Entering loop body
libvorbis/lib/vorbisfile.c
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
^ Entering loop body
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
^ Assuming 'i' is >= 'channels'
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
2012 else if(val<-128)val=-128;
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
^ Loop body executed 0 times
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
2012 else if(val<-128)val=-128;
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
^ Looping back to the head of the loop
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
Assuming 'j' is >= 'samples'
libvorbis/lib/vorbisfile.c
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
^ Assuming 'j' is >= 'samples'
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2012 else if(val<-128)val=-128;
2013 *buffer++=val+off;
2014 }
2015 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2016 }else{
2017 int off=(sgned?0:32768);
2018
Event 102: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2034)
libvorbis/lib/vorbisfile.c
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
2026 for(j=0;j<samples;j++) {
2027 val=vorbis_ftoi(src[j]*32768.f);
2028 if(val>32767)val=32767;
2029 else if(val<-32768)val=-32768;
2030 *dest=val;
2031 dest+=channels;
2032 }
2033 }
2034 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2035
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
2039 for(i=0;i<channels;i++) {
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
2042 for(j=0;j<samples;j++) {
2043 val=vorbis_ftoi(src[j]*32768.f);
2044 if(val>32767)val=32767;
2045 else if(val<-32768)val=-32768;
2046 *dest=val+off;
2047 dest+=channels;
2048 }
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is not equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is not equal to 0
libvorbis/lib/vorbisfile.c
2014 }
2015 vorbis_fpu_restore(fpu);
2016 }else{
2017 int off=(sgned?0:32768);
^ Assuming 'sgned' is not equal to 0
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2019 if(host_endian==bigendianp){
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_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.c
2019 if(host_endian==bigendianp){
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
^ Assuming 'i' is >= 'channels'
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
2026 for(j=0;j<samples;j++) {
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
^ Loop body executed 0 times
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
2026 for(j=0;j<samples;j++) {
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2031 dest+=channels;
2032 }
2033 }
2034 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2035
2036 }else{
2037
Event 103: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2050)
libvorbis/lib/vorbisfile.c
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
2039 for(i=0;i<channels;i++) {
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
2042 for(j=0;j<samples;j++) {
2043 val=vorbis_ftoi(src[j]*32768.f);
2044 if(val>32767)val=32767;
2045 else if(val<-32768)val=-32768;
2046 *dest=val+off;
2047 dest+=channels;
2048 }
2049 }
2050 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2051
2052 }
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
2060 else if(val<-32768)val=-32768;
2061 val+=off;
2062 *buffer++=(val>>8);
2063 *buffer++=(val&0xff);
2064 }
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is not equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c
2014 }
2015 vorbis_fpu_restore(fpu);
2016 }else{
2017 int off=(sgned?0:32768);
^ Assuming 'sgned' is 0
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2035
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2039 for(i=0;i<channels;i++) {
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_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.c
2035
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2039 for(i=0;i<channels;i++) {
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
2039 for(i=0;i<channels;i++) {
^ Assuming 'i' is >= 'channels'
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
2042 for(j=0;j<samples;j++) {
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
2039 for(i=0;i<channels;i++) {
^ Loop body executed 0 times
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
2042 for(j=0;j<samples;j++) {
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2047 dest+=channels;
2048 }
2049 }
2050 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2051
2052 }
2053 }else if(bigendianp){
Event 104: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2065)
libvorbis/lib/vorbisfile.c
2051
2052 }
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
2060 else if(val<-32768)val=-32768;
2061 val+=off;
2062 *buffer++=(val>>8);
2063 *buffer++=(val&0xff);
2064 }
2065 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2066
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
2074 else if(val<-32768)val=-32768;
2075 val+=off;
2076 *buffer++=(val&0xff);
2077 *buffer++=(val>>8);
2078 }
2079 vorbis_fpu_restore(fpu);
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is not equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c
2014 }
2015 vorbis_fpu_restore(fpu);
2016 }else{
2017 int off=(sgned?0:32768);
^ Assuming 'sgned' is 0
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
Assuming 'bigendianp' is not equal to 0
libvorbis/lib/vorbisfile.c
2050 vorbis_fpu_restore(fpu);
2051
2052 }
2053 }else if(bigendianp){
^ Assuming 'bigendianp' is not equal to 0
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2052 }
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_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.c
2052 }
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entering loop body
libvorbis/lib/vorbisfile.c
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
^ Entering loop body
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
^ Assuming 'i' is >= 'channels'
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
2060 else if(val<-32768)val=-32768;
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
^ Loop body executed 0 times
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
2060 else if(val<-32768)val=-32768;
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
^ Looping back to the head of the loop
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
Assuming 'j' is >= 'samples'
libvorbis/lib/vorbisfile.c
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
^ Assuming 'j' is >= 'samples'
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2062 *buffer++=(val>>8);
2063 *buffer++=(val&0xff);
2064 }
2065 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2066
2067 }else{
2068 int val;
Event 105: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2079)
libvorbis/lib/vorbisfile.c
2065 vorbis_fpu_restore(fpu);
2066
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
2074 else if(val<-32768)val=-32768;
2075 val+=off;
2076 *buffer++=(val&0xff);
2077 *buffer++=(val>>8);
2078 }
2079 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2080
2081 }
2082 }
2083 }
2084
2085 vorbis_synthesis_read(&vf->vd,samples);
2086 hs=vorbis_synthesis_halfrate_p(vf->vi);
2087 vf->pcm_offset+=(samples<<hs);
2088 if(bitstream)*bitstream=vf->current_link;
2089 return(samples*bytespersample);
2090 }else{
2091 return(samples);
2092 }
2093 }
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is not equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c
2014 }
2015 vorbis_fpu_restore(fpu);
2016 }else{
2017 int off=(sgned?0:32768);
^ Assuming 'sgned' is 0
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
Assuming 'bigendianp' is 0
libvorbis/lib/vorbisfile.c
2050 vorbis_fpu_restore(fpu);
2051
2052 }
2053 }else if(bigendianp){
^ Assuming 'bigendianp' is 0
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2066
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_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.c
2066
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entering loop body
libvorbis/lib/vorbisfile.c
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
^ Entering loop body
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
^ Assuming 'i' is >= 'channels'
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
2074 else if(val<-32768)val=-32768;
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
^ Loop body executed 0 times
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
2074 else if(val<-32768)val=-32768;
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
^ Looping back to the head of the loop
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
Assuming 'j' is >= 'samples'
libvorbis/lib/vorbisfile.c
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
^ Assuming 'j' is >= 'samples'
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2076 *buffer++=(val&0xff);
2077 *buffer++=(val>>8);
2078 }
2079 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2080
2081 }
2082 }
Probably some of these would not actually happen in the real world, but it might be worth addressing them all anyway.
Thanks, Benbuck