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
Cleanup formatting and minor code changes #2
Conversation
Hi! Please add proper description into commit message and do not add external links... Also maybe you should squash them into one commit. |
fd66d90
to
866b4b5
Compare
Could you please check again. |
dp = getIfByName(IfPt->ifr_name, 1); | ||
if (dp != NULL && dp->allowednets != NULL) { | ||
allowednet = (struct SubnetList *)malloc(sizeof(struct SubnetList)); | ||
if (allowednet == NULL) my_log(LOG_ERR, 0, "Out of memory !"); |
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.
this is broken code
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.
Please fix this part and also fix your email address in your git commit.
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.
Fixed the formatting related to this change.
The email adress is the same as used by changes done inside the GitHub UI. Which one is prefered for consistency (GitHub email or private email)?
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.
Null pointer dereference is still not fixed. Also rebase patch on top of branch.
Email address must be valid. Does not matter if private or public... Just valid address on which people can reach you (e.g. in case somebody would need to update your patch).
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.
Maybe you could explain the problem in the above code to me, because my C is quite rusty and I clearly fail to see it.
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.
Null pointer dereference:
allowednet = ...
if (allowednet == NULL) my_log(...);
allowednet->...
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 believe code above avoids NULL pointer dereference because logging an error via
if (allowednet == NULL) my_log(LOG_ERR, 0, "Out of memory !");
leads to 'src/syslog.c' and there it exits after logging:
if( Severity <= LOG_ERR ) exit( -1 );
2cb283d
to
32c8241
Compare
Rewrote all email addresses so that only one email is used for changes by my |
"This branch has conflicts that must be resolved" And please do different things in different commits/pull requests. |
Original patch submitted by: yuri@rivera.ru
Linux and FreeBSD use a different signature for setpgrp. Both support setpgid which replaces the now obsolete setpgrp and has the same signature on both systems.
pfSense Ticket #5783
https://redmine.pfsense.org/issues/5783
see:
pfsense/FreeBSD-ports@28cdaca