mariadb/client
Anel Husakovic bd0d7ea540 MDBF-534: Coverity scan: fix client folder
---------------------------------
File: `mysqltest`
---------------------------------
- Coverity (SIZEOF_MISMATCH):
  - https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53074863&mergedDefectId=972322
    Function `qsort` have to use size of element that is `uchar *`

- Coverity (REVERSE_INULL):
  - https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53074524&mergedDefectId=1519693&fileStart=3376&fileEnd=3625
    First check if null and then use `strlen`, not reversed.

- FALSE POSITIVES
  - Coverity (TAINTED_SCALAR):
    https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53074760&mergedDefectId=1519321

  - Coverity (CHECKED_RETURN):
    - https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53074692&mergedDefectId=971714
    - https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53072839&mergedDefectId=971715

  - Coverity (FORWARD_NULL):
    There is already issued DBUG_ASSERT(query_end) few lines before
    https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53074002&mergedDefectId=971916&eventId=53074002-5

  - Coverity (OVERRUN):
    - https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53074470&mergedDefectId=1519697
    - https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53074862&mergedDefectId=1520391
      `uint64_max` and `SIZE_MAX` (max for `size_t`) are same as `count` argument
      for `memcmp`.

  - Coverity (RESOURCE_LEAK):
    - https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53074163&mergedDefectId=1519889&eventId=53074163-446

- INTENTION:
  - Coverity (SIZEOF_MISMATCH):
    - https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728385&defectInstanceId=53074650&mergedDefectId=1520109
      `len` argument is used only in printing so it is not making impact (may be removed as an alternative).
      In this example size of pointer (8B) is used, that is not the size of value that pointer points to.
2023-02-17 13:43:43 +00:00
..
async_example.c
client_priv.h
CMakeLists.txt
completion_hash.cc
completion_hash.h
echo.c
my_readline.h
mysql.cc
mysql_plugin.c
mysql_upgrade.c
mysqladmin.cc
mysqlbinlog.cc
mysqlcheck.c
mysqldump.c
mysqlimport.c
mysqlshow.c
mysqlslap.c
mysqltest.cc MDBF-534: Coverity scan: fix client folder 2023-02-17 13:43:43 +00:00
readline.cc
sql_string.cc.dontuse
sql_string.h.dontuse