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

introduces size_t over int in length parameters/variables, improves code quality, safer usage of stdlib #336

Closed
wants to merge 24 commits into from

Conversation

blacksheeep
Copy link
Contributor

Solve a lot of security issues:

  • use size types
  • safer usage of stdlib / string - lib
  • better coding styling.

@blacksheeep
Copy link
Contributor Author

@mfrey any idea why I cannot squash the commits.

@cgundogan
Copy link
Collaborator

what is it saying when you try to squash?

@blacksheeep
Copy link
Contributor Author

blacksheeep commented Dec 18, 2018 via email

@mfrey
Copy link
Collaborator

mfrey commented Dec 19, 2018

I get some wired conflicts, and it has some strange merge conflicts - I
have no idea why.

I'll have a look later

@mfrey mfrey changed the title S3lph fixes introduces size_t over int in length parameters/variables, improves code quality, safer usage of stdlib Dec 19, 2018
@mfrey mfrey added the requires squashing commits need to be squashed before merge label Dec 19, 2018
@mfrey mfrey self-requested a review December 19, 2018 10:37
@mfrey
Copy link
Collaborator

mfrey commented Dec 19, 2018

We've had a brief discussion in #334 on bool (which was introduced in C99) and CCN-lites support for the Linux kernel (which in turn does not support C99). I've went over a few files and noticed that in some files a bool type is used (which probably results in issues in the Linux frontend of CCN-lite), i.e.

src/ccnl-core/include/ccnl-content.h:#include <stdbool.h>
src/ccnl-core/include/ccnl-pkt-util.h:#include <stdbool.h>
src/ccnl-core/include/ccnl-pkt-util.h:bool
src/ccnl-core/include/ccnl-pkt.h:#include <stdbool.h>
src/ccnl-core/include/ccnl-pkt.h:    bool mbf;
src/ccnl-core/src/ccnl-pkt-util.c:bool
src/ccnl-pkt/include/ccnl-pkt-ndntlv.h:#include <stdbool.h>
src/ccnl-pkt/include/ccnl-pkt-ndntlv.h:    bool mustbefresh;           /**< MustBeFresh Selector */

Do you consider this as an issue as well and should create a ticket? It does not necessarily affect the PR (haven't checked if some of it was introduced with the PR).

@blacksheeep
Copy link
Contributor Author

Hmmm I could compile it now, but I will change the bools.

@blacksheeep
Copy link
Contributor Author

I addressed the bools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires squashing commits need to be squashed before merge
Projects
Improve the Code Quality
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

4 participants