-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fixes #334
Fixes #334
Conversation
…ns some other fixes for issues like memory leaks and insufficient error handling.
You shouldn't update your feature branch by merging your master into the feature branch, but by using fetch/rebase. Doing otherwise is considered bad style. |
I suggest to make a clean new feature branch and cherry-pick the corresponding commits over to the new (clean) branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one point:
can we change the variable suite to unsigned.
and to a unique datasize?
int | ||
ccnl_pkt_mkComponent(int suite, unsigned char *dst, char *src, int srclen); | ||
size_t | ||
ccnl_pkt_mkComponent(int suite, uint8_t *dst, char *src, size_t srclen); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suite is here a int, should be unsigned.
struct ccnl_prefix_s* | ||
ccnl_prefix_new(int suite, int cnt); | ||
struct ccnl_prefix_s* | ||
ccnl_prefix_new(char suite, uint32_t cnt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suite is here a char, should be unsigned and either int or char.
#include <stdbool.h> | ||
#include <stddef.h> | ||
|
||
bool | ||
ccnl_isSuite(int suite); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? bool
was introduced as a type in C99
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently we have kernel support, therefore there is no support for C99
unsigned char *hmacSignature; | ||
uint8_t *hmacStart; | ||
size_t hmacLen; | ||
uint8_t *hmacSignature; | ||
#endif | ||
unsigned int flags; | ||
char suite; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsigned?
int compcnt; /**< number of name components */ | ||
uint8_t **comp; /**< name components of the prefix without '\0' at the end */ | ||
size_t *complen; /**< length of the name components */ | ||
uint32_t compcnt; /**< number of name components */ | ||
char suite; /**< type of the packet format */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsigned
Currently CCN-Lite is not C99 compiled, which causes an error when compiling for loops with iterator defined in the for loop |
How important is this, in case we squash the commits anyway? |
This pull request should fix some of the problematic typing problem and other potentional security fixes
Contribution description
Fix, Type Confusions, Unsafe Function Calls,...