Branch: refs/heads/davem/coverity
  Home:   https://github.com/Perl/perl5
  Commit: aaa937ab653d8f440944925d1b03d2a05955f9c3
      
https://github.com/Perl/perl5/commit/aaa937ab653d8f440944925d1b03d2a05955f9c3
  Author: David Mitchell <da...@iabyn.com>
  Date:   2024-04-01 (Mon, 01 Apr 2024)

  Changed paths:
    M op.c

  Log Message:
  -----------
  Perl_rcpv_new(): add assert(pv)

When this function is called with the RCPVf_USE_STRLEN flag, it gets the
string length by calling strlen(pv). Coverity (CID 376192) points out
that pv could be NULL.

This commit adds an assert(pv), so that the code will bail out on the
line before the strlen() in this case, which is probably enough to
silence Coverity. Perhaps we aught to have a proper croak() there, but
this is a utility function mainly used in limited places in the core,
where the caller likely knows that they're doing.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to