pin / tftp

TFTP server and client library for Golang
MIT License
287 stars 74 forks source link

Strip null byte #1

Closed mojotalantikite closed 9 years ago

mojotalantikite commented 9 years ago

I was just playing around with your library and ran into a small issue when using the default tftp program in OS X 10.10.3. It looks like there is a \x00 byte that gets passed into the filename parameter, which causes a read error if you attempt to do an os.Open(filename) in a tftp ReadHandler.

I fixed this just by stripping the \x00 from the RQ in my fork -- I'll submit a PR for it if you'd like.

Also, my vim setup runs "go fmt" on save and I noticed it hadn't been run on this repo. I fixed that in a separate commit.

pin commented 9 years ago

Mojo, thank you for catching and fixing that, closing!