Fixed findings

List of Findings

Error: COMPILER_WARNING: [#def1]
libplist-2.3.0-build/libplist-2.3.0/src/bplist.c: scope_hint: In function 'parse_unicode_node'
libplist-2.3.0-build/libplist-2.3.0/src/bplist.c:406:22: warning[-Wuse-after-free]: pointer 'tmpstr_29' may be used after 'realloc'
#  406 |         data->strval = tmpstr;
#      |         ~~~~~~~~~~~~~^~~~~~~~
libplist-2.3.0-build/libplist-2.3.0/src/bplist.c:404:20: note: call to 'realloc' here
#  404 |     data->strval = realloc(tmpstr, items_written+1);
#      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  404|       data->strval = realloc(tmpstr, items_written+1);
#  405|       if (!data->strval)
#  406|->         data->strval = tmpstr;
#  407|       data->length = items_written;
#  408|       return node_create(NULL, data);

Error: COMPILER_WARNING: [#def2]
libplist-2.3.0-build/libplist-2.3.0/src/jplist.c:398:15: warning[-Wenum-int-mismatch]: conflicting types for 'plist_to_json' due to enum/integer mismatch; have 'int(void *, char **, uint32_t *, int)' {aka 'int(void *, char **, unsigned int *, int)'}
#  398 | PLIST_API int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)
#      |               ^~~~~~~~~~~~~
libplist-2.3.0-build/libplist-2.3.0/src/plist.h:29: included_from: Included from here.
libplist-2.3.0-build/libplist-2.3.0/src/jplist.c:38: included_from: Included from here.
libplist-2.3.0-build/libplist-2.3.0/include/plist/plist.h:754:17: note: previous declaration of 'plist_to_json' with type 'plist_err_t(void *, char **, uint32_t *, int)' {aka 'plist_err_t(void *, char **, unsigned int *, int)'}
#  754 |     plist_err_t plist_to_json(plist_t plist, char **plist_json, uint32_t* length, int prettify);
#      |                 ^~~~~~~~~~~~~
#  396|   }
#  397|   
#  398|-> PLIST_API int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)
#  399|   {
#  400|       uint64_t size = 0;

Error: COMPILER_WARNING: [#def3]
libplist-2.3.0-build/libplist-2.3.0/src/jplist.c:782:15: warning[-Wenum-int-mismatch]: conflicting types for 'plist_from_json' due to enum/integer mismatch; have 'int(const char *, uint32_t,  void **)' {aka 'int(const char *, unsigned int,  void **)'}
#  782 | PLIST_API int plist_from_json(const char *json, uint32_t length, plist_t * plist)
#      |               ^~~~~~~~~~~~~~~
libplist-2.3.0-build/libplist-2.3.0/include/plist/plist.h:798:17: note: previous declaration of 'plist_from_json' with type 'plist_err_t(const char *, uint32_t,  void **)' {aka 'plist_err_t(const char *, unsigned int,  void **)'}
#  798 |     plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist);
#      |                 ^~~~~~~~~~~~~~~
#  780|   }
#  781|   
#  782|-> PLIST_API int plist_from_json(const char *json, uint32_t length, plist_t * plist)
#  783|   {
#  784|       if (!plist) {

Error: COMPILER_WARNING: [#def4]
libplist-2.3.0-build/libplist-2.3.0/src/oplist.c:442:15: warning[-Wenum-int-mismatch]: conflicting types for 'plist_to_openstep' due to enum/integer mismatch; have 'int(void *, char **, uint32_t *, int)' {aka 'int(void *, char **, unsigned int *, int)'}
#  442 | PLIST_API int plist_to_openstep(plist_t plist, char **openstep, uint32_t* length, int prettify)
#      |               ^~~~~~~~~~~~~~~~~
libplist-2.3.0-build/libplist-2.3.0/src/plist.h:29: included_from: Included from here.
libplist-2.3.0-build/libplist-2.3.0/src/oplist.c:38: included_from: Included from here.
libplist-2.3.0-build/libplist-2.3.0/include/plist/plist.h:767:17: note: previous declaration of 'plist_to_openstep' with type 'plist_err_t(void *, char **, uint32_t *, int)' {aka 'plist_err_t(void *, char **, unsigned int *, int)'}
#  767 |     plist_err_t plist_to_openstep(plist_t plist, char **plist_openstep, uint32_t* length, int prettify);
#      |                 ^~~~~~~~~~~~~~~~~
#  440|   }
#  441|   
#  442|-> PLIST_API int plist_to_openstep(plist_t plist, char **openstep, uint32_t* length, int prettify)
#  443|   {
#  444|       uint64_t size = 0;

Error: COMPILER_WARNING: [#def5]
libplist-2.3.0-build/libplist-2.3.0/src/oplist.c:895:15: warning[-Wenum-int-mismatch]: conflicting types for 'plist_from_openstep' due to enum/integer mismatch; have 'int(const char *, uint32_t,  void **)' {aka 'int(const char *, unsigned int,  void **)'}
#  895 | PLIST_API int plist_from_openstep(const char *plist_ostep, uint32_t length, plist_t * plist)
#      |               ^~~~~~~~~~~~~~~~~~~
libplist-2.3.0-build/libplist-2.3.0/include/plist/plist.h:808:17: note: previous declaration of 'plist_from_openstep' with type 'plist_err_t(const char *, uint32_t,  void **)' {aka 'plist_err_t(const char *, unsigned int,  void **)'}
#  808 |     plist_err_t plist_from_openstep(const char *openstep, uint32_t length, plist_t * plist);
#      |                 ^~~~~~~~~~~~~~~~~~~
#  893|   }
#  894|   
#  895|-> PLIST_API int plist_from_openstep(const char *plist_ostep, uint32_t length, plist_t * plist)
#  896|   {
#  897|       if (!plist) {

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.82.0
diffbase-analyzer-version-cppcheck2.16.0
diffbase-analyzer-version-gcc14.2.1
diffbase-analyzer-version-gcc-analyzer15.0.0
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-186.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-namelibplist-2.6.0-1.fc42
diffbase-store-results-to/tmp/tmp0vilqkfl/libplist-2.6.0-1.fc42.tar.xz
diffbase-time-created2024-11-13 01:39:39
diffbase-time-finished2024-11-13 01:41:40
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp0vilqkfl/libplist-2.6.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp0vilqkfl/libplist-2.6.0-1.fc42.src.rpm'
diffbase-tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-186.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibplist-2.3.0-6.fc41
store-results-to/tmp/tmpstzs0rx7/libplist-2.3.0-6.fc41.tar.xz
time-created2024-11-13 01:36:56
time-finished2024-11-13 01:39:22
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpstzs0rx7/libplist-2.3.0-6.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpstzs0rx7/libplist-2.3.0-6.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9