-
Notifications
You must be signed in to change notification settings - Fork 236
Closed
Description
Is your feature request related to a problem? Please describe.
Current coverage 91.3%
Missing coverage for the following: cfe_fs_decompress.c
FS_gz_eat_header_Reentrant
214 2 : if ( (flags & CONTINUATION) != 0 ) {
215 0 : NEXTBYTE();
216 0 : if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER;
217 0 : NEXTBYTE();
218 0 : if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER;
219 : }
220 :
221 2 : if ( (flags & EXTRA_FIELD) != 0 ) {
222 : uint32 len;
223 0 : len = NEXTBYTE();
224 0 : if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER;
225 0 : len |= NEXTBYTE() << 8;
226 0 : if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER;
227 0 : while (len--) {
228 0 : NEXTBYTE();
229 0 : if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER;
230 : }
251 0 : keep_going = true;
252 0 : while ( keep_going ) {
253 :
254 : /* Get the next byte */
255 0 : thisByte = NEXTBYTE();
256 :
257 : /* Header failure when end of file is reached or a read failure occurs */
258 0 : if ((thisByte == EOF) || (State->Error != CFE_SUCCESS)) return CFE_FS_GZIP_READ_ERROR_HEADER;
259 :
260 : /* End of string was found */
261 0 : if (thisByte == 0) keep_going = false;
FS_gz_huft_build_Reentrant
399 0 : *m = 0;
400 0 : return CFE_SUCCESS;
529 : {
530 0 : return CFE_FS_GZIP_BAD_CODE_BLOCK;
583 0 : State->bk -= 8;
584 0 : State->inptr--;
634 0 : else res = CFE_FS_GZIP_BAD_CODE_BLOCK;
689 0 : return CFE_FS_GZIP_INDEX_ERROR;
703 0 : State->outcnt = w;
704 0 : FS_gz_flush_window_Reentrant(State);
705 0 : w = 0;
736 0 : return CFE_FS_GZIP_INDEX_ERROR;
FS_gz_inflate_dynamic_Reentrant
928 0 : NEEDBITS(7);
929 0 : j = 11 + ( (uint32)b & 0x7f );
930 0 : DUMPBITS(7);
931 0 : if ( (uint32)i + j > n ) return CFE_FS_GZIP_BAD_DATA;
932 0 : while (j--) ll[i++] = 0;
933 0 : l = 0;
FS_gz_inflate_stored_Reentrant
1053 0 : n = ( (uint32)b & 0xffff );
1054 0 : DUMPBITS(16);
1055 :
1056 0 : NEEDBITS(16);
1057 0 : if ( n != (uint32)( (~b) & 0xffff) ) return CFE_FS_GZIP_BAD_DATA; /* error in compressed data */
1058 0 : DUMPBITS(16);
1059 :
1060 :
1061 : /* read and output the compressed data */
1062 0 : while (n--)
1063 : {
1064 0 : NEEDBITS(8);
1065 0 : State->window[w++] = (uint8)b;
1066 0 : if ( w == WSIZE )
1067 : {
1068 0 : State->outcnt = w;
1069 0 : FS_gz_flush_window_Reentrant(State);
1070 0 : w = 0;
1071 : }
1072 0 : DUMPBITS(8);
1073 : }
1074 :
1075 : /* restore the globals from the locals */
1076 0 : State->outcnt = w; /* restore global window pointer */
1077 0 : State->bb = b; /* restore global bit buffer */
1078 0 : State->bk = k;
1079 :
1080 0 : return CFE_SUCCESS;
Requester Info
Anh Van, NASA Goddard
Reactions are currently unavailable