schwehr / generic-sensor-format

Sonar Generic Sensor Format (gsf) codec
Other
13 stars 8 forks source link

CID 113062 (#1 of 1): Buffer not null terminated (BUFFER_SIZE) #58

Closed schwehr closed 8 years ago

schwehr commented 8 years ago

Pretty much the exact same as #56

gsf_indx.c: Line 486

strncpy(index_header.version, GSF_INDEX_VERSION, GSF_INDEX_VERSION_SIZE);

Coverity's complaint:

buffer_size: Calling strncpy with a source string whose length (16 chars) is greater than or equal to the size argument (16) will fail to null-terminate index_header.version.
schwehr commented 8 years ago

Confirmed fixed by converity scan.