Skip to content

Possible Buffer Underrun in cfe_fs_decompress.c [MMS-IVV-013] [OBS-1238] [GSFC DCR 22838] #135

@skliper

Description

@skliper

Source Code File: cfe\fsw\cfe-core\src\fs\cfe_fs_decompress.c
Line 530
Output from Code Analysis tool: "Buffer overflow, array index of 'x' may be outside the bounds. Array 'x' of size 17 declared at line 367 may use inde"
   
{{{
530  while ( ( i & ((1 << w) - 1) ) != x[h] ) {
531   h--;  /* don't need to update q */
532      w -= l;  
}}}

The array x could be under run if h attains a value of -1. This will occur if the condition does not evaluate to true before h is decremented below 0. This could also lead to an infinitely executing loop.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions