troglobit / mdnsd

Jeremie Miller's original mdnsd
BSD 3-Clause "New" or "Revised" License
57 stars 35 forks source link

_ldecomp breaks if on some offsets (128-255, 384-511, etc) #43

Closed ChrisBeaumont67 closed 3 years ago

ChrisBeaumont67 commented 3 years ago

It appears that the signed/unsigned handling in _ldecomp() leaves a few things in limbo...

Attaching a small code sample that highlights this (exhaustively), with an inline fix (a simple cast does wonders :smile:)

_ldecomp.zip

troglobit commented 3 years ago

Interesting! Do you think you could whip up a patch or pull request?

ChrisBeaumont67 commented 3 years ago

[Sorry for the long delay] I couldn't manage to actually create a PR (Cant push the branch!?!)
Resorting to a copy/paste (well that didn't work either... so zipped it comes)

Issue43.zip

troglobit commented 3 years ago

Thank you! I'll have a look at the ZIP later this weekend, I hope.

You have to fork the repo and push to your own fork, then create a pull request. This because I (and GitHub by default) don't allow anyone to push.

troglobit commented 3 years ago

There, sorry for taking so long to apply this to master!