Skip to content

fix issues in taosdump.c #12432

@xiaopingcs

Description

@xiaopingcs

Bug Description
fix issues found by Coverity Scan in taosdump.c

To Reproduce
Steps to reproduce the behavior:
N/A

Expected Behavior
fix following issues found by Coverity Scan in taosdump.c

  1. String not null terminated High TDengine/src/kit/taos-tools/src/benchUtil.c postProceSql
  2. Resource leak High TDengine/src/kit/taos-tools/src/taosdump.c parse_json_to_recordschema
  3. Resource leak High TDengine/src/kit/taos-tools/src/taosdump.c dumpInAvroDataImpl
  4. Resource leak High TDengine/src/kit/taos-tools/src/taosdump.c dumpInAvroDataImpl
  5. Uninitialized scalar variable High TDengine/src/kit/taos-tools/src/taosdump.c checkFileExistsExt
  6. Uninitialized pointer read High TDengine/src/kit/taos-tools/src/taosdump.c createMTableAvroHeadImp
  7. Resource leak High TDengine/src/kit/taos-tools/src/taosdump.c dumpNormalTablesOfStb
  8. Array compared against 0 Medium TDengine/src/kit/taos-tools/src/taosdump.c dumpInAvroTbTagsImpl
  9. Uninitialized pointer read High TDengine/src/kit/taos-tools/src/taosdump.c dumpCreateTableClauseAvro
  10. Uninitialized pointer read High TDengine/src/kit/taos-tools/src/taosdump.c dumpCreateTableClauseAvro
  11. Resource leak High TDengine/src/kit/taos-tools/src/taosdump.c parse_json_for_inspect
  12. Argument cannot be negative Medium TDengine/src/kit/taos-tools/src/taosdump.c createMTableAvroHead
  13. Resource leak High TDengine/src/kit/taos-tools/src/taosdump.c createMTableAvroHead
  14. Uninitialized pointer read High TDengine/src/kit/taos-tools/src/taosdump.c createMTableAvroHeadImp
  15. Uninitialized pointer read High TDengine/src/kit/taos-tools/src/taosdump.c createMTableAvroHeadImp
  16. Array compared against 0 Medium TDengine/src/kit/taos-tools/src/taosdump.c dumpInAvroDataImpl
  17. Explicit null dereferenced Medium TDengine/src/kit/taos-tools/src/taosdump.c dumpInAvroNtbImpl

Screenshots
N/A

Environment (please complete the following information):
N/A

Additional Context
Coverity Scan Dashboard for TDengine: https://scan.coverity.com/projects/tdengine?tab=overview

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions