cn-uofbasel / ccn-lite

CCN-lite, a lightweight implementation of the CCNx protocol and its variations
ISC License
74 stars 63 forks source link

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

Closed blacksheeep closed 5 years ago

blacksheeep commented 5 years ago

Solve a lot of security issues:

blacksheeep commented 5 years ago

@mfrey any idea why I cannot squash the commits.

cgundogan commented 5 years ago

what is it saying when you try to squash?

blacksheeep commented 5 years ago

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

And it kills some of the changes made.

On Tue, Dec 18, 2018, 18:33 Cenk Gündoğan <notifications@github.com wrote:

what is it saying when you try to squash?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cn-uofbasel/ccn-lite/pull/336#issuecomment-448303998, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeQ_YAA-n5leOIesGJw6Y_64vTUB2Piks5u6SbigaJpZM4ZYgjh .

mfrey commented 5 years ago

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

I'll have a look later

mfrey commented 5 years ago

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 commented 5 years ago

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

blacksheeep commented 5 years ago

I addressed the bools.