Skip to content
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

tb_userspace.c is not byte-order agnostic #5

Open
GoogleCodeExporter opened this issue Jul 7, 2015 · 0 comments
Open

tb_userspace.c is not byte-order agnostic #5

GoogleCodeExporter opened this issue Jul 7, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

I was skimming through tb_userspace.c and noticed a lot of numeric constants 
with a hard-coded little-endian byte order.

For example, 0x0220 is used to match "2002", which will certainly fail on any 
big-endian architecture.  Instead, you should match against htons(0x2002).

This bug exists all throughout the code.

For a reference on network programming, see:
http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html

Original issue reported on code.google.com by [email protected] on 10 Dec 2010 at 3:30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant