• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

briandfoy / PerlPowerTools / 13668155543
63%

Build:
DEFAULT BRANCH: master
Ran 05 Mar 2025 03:58AM UTC
Jobs 1
Files 4
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Mar 2025 03:54AM UTC coverage: 70.088% (-0.9%) from 70.951%
13668155543

push

github

web-flow
patch: crash for invalid context diff input (#979)

* I generated a Context diff with 2 hunks
* I manually swapped the 2 numbers at the top of hunk1, from "1,4" to "4,1" (the line number range for the hunk)
* GNU patch correctly rejected this invalid diff, but this version crashed with an ARRAY error
* Add validation for backwards range, based on code previously added for Normal diffs

%cat diff.ctx 
*** id	Wed Mar  5 09:16:33 2025
--- id2	Wed Mar  5 09:14:36 2025
***************
*** 4,1 ****
- #!/usr/bin/perl
  
  =begin metadata
  
--- 1,3 ----
***************
*** 12,24 ****
  =cut
  
  
- #
- # An implementation of the 'id' utility in Perl.  Written for the Perl Power
- # Tools (PPT) project by Theo Van Dinter (felicity@kluge.net).
- #
- # $Id: id,v 1.2 2004/08/05 14:17:43 cwest Exp $
- #
- 
  use strict;
  
  use File::Basename qw(basename);
--- 11,16 ----

%perl -Mwarnings -Mdiagnostics  patch -c id diff.ctx
Hmm...  Looks like a context diff to me...
Patching file id using Plan A...
Short hunk ignored...no second line range.
1 out of 1 hunks ignored--saving rejects to id.rej

Can't use an undefined value as an ARRAY reference at patch line 382, <$in_fh>
	line 249 (#1)
    (F) A value used as either a hard reference or a symbolic reference must
    be a defined value.  This helps to delurk some insidious errors.
    
Uncaught exception from user code:
	Can't use an undefined value as an ARRAY reference at patch line 382, <$in_fh> line 249.
	Patch::bless(Patch::Context=HASH(0x55908a4f50)) called at patch line 161

396 of 565 relevant lines covered (70.09%)

4016.41 hits per line

Jobs
ID Job ID Ran Files Coverage
1 13668155543.1 05 Mar 2025 03:58AM UTC 4
70.09
GitHub Action Run
Source Files on build 13668155543
  • Tree
  • List 4
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • fa977b3a on github
  • Prev Build on master (#13668024526)
  • Next Build on master (#13668385521)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc