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

Syntax Error in ‘src/torrent/object_raw_bencode.h’ #8

Closed
veryfoolish opened this issue Dec 24, 2011 · 2 comments
Closed

Syntax Error in ‘src/torrent/object_raw_bencode.h’ #8

veryfoolish opened this issue Dec 24, 2011 · 2 comments

Comments

@veryfoolish
Copy link

I really dislike the way you’ve responded to my previous bug reports, but I don’t want your software to be broken so I am going through it to find bugs since you obviously don’t seem to really care about them. Hopefully this will make the Internet just a tiny bit more secure.

Anyway, in ‘src/torrent/object_raw_bencode.h’ we have the following:

bool empty() const { return m_size == 0;; }

Which should obviously be:

bool empty() const { return m_size == 0; }

You’re welcome!

@veryfoolish
Copy link
Author

Just to note; I am auditing your code in general. What would be the easiest way for me to send you the things I find? There are quite a lot of issues in your code: you use variable-sized buffers all over, esp. in the memory management section... you really should probably use std::vector or perhaps a new type... but what you’re writing is technically incorrect and almost certainly insecure!— You declare enums incorrectly too; as if you were writing C not C++. I’m not 100% sure, but I also think you’re using std::bind incorrectly; or at least given the length of your arguments it’s very, very difficult to figure out if it’s secure or not.

Moreover, the code in general a complete mess. You misspell things all the time (I understand English isn’t your first language) and the documentation is awful.

@rakshasa
Copy link
Owner

Variable-length arrays are part of C99, and nice to use so I use them. While some uses of non-POD cases need to be fixed it is a limited issue. In those the other cases it is no more incorrect or insecure than their use in C99. Same for enums, what is C or C++ style doesn't matter.

And length of bind arguments only matter if they are incorrect, with type safety ensuring that the arguments are the right type.

Real examples of issues are whats needed, not generic statements on style are less useful.

Removed several extra semicolons.

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

No branches or pull requests

2 participants