Print

Print


  Branch: refs/heads/master
  Home:   https://github.com/xrootd/xrootd
  Commit: 654133bc1158e4815a45dc8dd70023e5fff82424
      https://github.com/xrootd/xrootd/commit/654133bc1158e4815a45dc8dd70023e5fff82424
  Author: Mattias Ellert <[log in to unmask]>
  Date:   2022-01-20 (Thu, 20 Jan 2022)

  Changed paths:
    M src/XrdCl/XrdClCopy.cc
    M src/XrdCms/XrdCmsUtils.cc

  Log Message:
  -----------
  Fix compiler warnings about pointers used after free:

.../src/XrdCms/XrdCmsUtils.cc: In function 'XrdCmsUtils::ParseMan(XrdSysError*, XrdOucTList**, char*, char*, int*, bool)':
.../src/XrdCms/XrdCmsUtils.cc:226:43: error: pointer 'newMans_175' may be used after 'operator delete(void*, unsigned long)' [-Werror=use-after-free]
  226 |          if (!plus || strcmp(hSpec, newP->text)) isBad = false;
      |                                     ~~~~~~^~~~
.../src/XrdCms/XrdCmsUtils.cc:221:27: note: call to 'operator delete(void*, unsigned long)' here
  221 |                    delete newP;
      |                           ^~~~

.../src/XrdCl/XrdClCopy.cc: In function 'IndexRemote(XrdCl::FileSystem*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short)':
.../src/XrdCl/XrdClCopy.cc:442:17: error: pointer used after 'operator delete(void*, unsigned long)' [-Werror=use-after-free]
  442 |       log->Error( AppMsg, "Bad URL: %s", current->Path );
      |       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../src/XrdCl/XrdClCopy.cc:441:14: note: call to 'operator delete(void*, unsigned long)' here
  441 |       delete current;
      |              ^~~~~~~


  Commit: cfada244483a3e2c7833164cb5e400fa1d9e06ab
      https://github.com/xrootd/xrootd/commit/cfada244483a3e2c7833164cb5e400fa1d9e06ab
  Author: Andrew Hanushevsky <[log in to unmask]>
  Date:   2022-01-19 (Wed, 19 Jan 2022)

  Changed paths:
    M src/XrdCl/XrdClCopy.cc
    M src/XrdCms/XrdCmsUtils.cc

  Log Message:
  -----------
  Merge pull request #1598 from ellert/use-after-free

Fix compiler warnings about pointers used after free:


Compare: https://github.com/xrootd/xrootd/compare/ca4769240a95...cfada244483a

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1