-
Notifications
You must be signed in to change notification settings - Fork 154
fix #148 #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #148 #149
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
ehsandeep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be fix the issue, however here an edge case causing a crash.
echo test | ./notify -bulk -cl 1
__ _ ___
___ ___ / /_(_) _/_ __
/ _ \/ _ \/ __/ / _/ // /
/_//_/\___/\__/_/_/ \_, / v1.0.2-dev
/___/
projectdiscovery.io
Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
Using default provider config: /Users/geekboy/.config/notify/provider-config.yaml
panic: runtime error: slice bounds out of range [:-2]
goroutine 1 [running]:
github.com/projectdiscovery/notify/internal/runner.bulkSplitter.func1({0x1400032fc60, 0x5, 0x5}, 0x0)
/Users/geekboy/Github/notify/internal/runner/util.go:36 +0x2e8
bufio.(*Scanner).Scan(0x1400031fe18)
/opt/homebrew/Cellar/go/1.18.2/libexec/src/bufio/scan.go:147 +0xac
github.com/projectdiscovery/notify/internal/runner.(*Runner).Run(0x14000323020)
/Users/geekboy/Github/notify/internal/runner/runner.go:112 +0x5b8
main.main()
/Users/geekboy/Github/notify/cmd/notify/notify.go:42 +0x184|
stdin is still broken: It's also causing files, when sent in Finally the change here doesn't seem relevant to the changes in #146 which introduced the problems. Returning I'm sorry for being critical but I don't think this should be merged, and I think #146 needs to be reworked. |
|
Aha
That might be contributing to the confusion around stdin being broken #146 stat's the input to get its size so as to set the buffer size. On Linux, and on macOS with large inputs, stdin has a reported size of 0. I will look to rework #146 when I get a chance |
|
Thanks @justinsteven for having a look at this. |








No description provided.