cron icon indicating copy to clipboard operation
cron copied to clipboard

Crash in cron.ParseStandard

Open secsys-go opened this issue 3 years ago • 2 comments

Crash

panic: runtime error: slice bounds out of range [:-1]

Crash Log

github.com/robfig/cron/v3.Parser.Parse({0x125d130}, {0x116435c, 0x9}) /Users/ljc/go/pkg/mod/github.com/robfig/cron/[email protected]/parser.go:99 +0x7bc github.com/robfig/cron/v3.ParseStandard(...) /Users/ljc/go/pkg/mod/github.com/robfig/cron/[email protected]/parser.go:230

PoC

cron.ParseStandard("TZ=TZ=TZ=")

secsys-go avatar Oct 21 '22 07:10 secsys-go

@robfig hey, my fuzzer encountered this problem, the solution seems to be simple. Now Parse panics when the time zone is entered incorrectly, like what is written here in the issue, so I just processed the input. Can you please take a look at my pr?

Placebo900 avatar Oct 09 '23 14:10 Placebo900

@Placebo900 robfig dipped out years ago so this is abandonware

tooptoop4 avatar Oct 09 '23 22:10 tooptoop4