mcuadros / go-syslog

Syslog server library for go.
http://godoc.org/gopkg.in/mcuadros/go-syslog.v2
MIT License
523 stars 143 forks source link

Fix a bug in parseUpToLen() for handling given max chars limit. #46

Closed scorptec68 closed 6 years ago

scorptec68 commented 6 years ago

The parseUpToLen function would not handle the max chars limit. Found when using a syslog client which used > max chars for the APP-NAME. I changed the syslog client to use max chars and it still didn't work. There was an off by 1 error. One of the tests even gave a max chars string and expected an error - changed that test to try with max+1 chars.