-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
introduce CHANNELLEN and convert some strncpy + \0 into strlcpy() #567
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LGTM, though there's still a lot more places with the hardcoded 81. |
i did some more places. |
michaelortmann
changed the title
Gotinvite strncpyz
introduce CHANNELLEN and convert some strncpy + \0 into strncpyz()
Aug 25, 2018
LGTM |
build |
Cizzle
requested changes
Oct 9, 2018
michaelortmann
changed the title
introduce CHANNELLEN and convert some strncpy + \0 into strncpyz()
introduce CHANNELLEN and convert some strncpy + \0 into strlcpy()
Oct 9, 2018
@Cizzle: requested changes were done. |
Cizzle
approved these changes
Oct 9, 2018
build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Found by: michaelortmann
Patch by: michaelortmann
Fixes: enhancement only patch
One-line summary:
introduce CHANNELLEN and convert some strncpy + \0 into strlcpy()
Additional description (if needed):
we had some irc discussion about #3 and #38, this patch here should be fine as is.
Test cases demonstrating functionality (if applicable):
test case 1 (actually here are 2 places checked at once):
i startet eggdrop, invited it to a +i channel and it worked fine.
i also put 2 debug printf()s into source for test only and got:
DEBUG: sizeof last_invchan = 81
and
DEBUG: sizeof chan->name = 81
(the first DEBUG is for the invite, the second for the join)
test case 2:
.+chan #test
worked fine
i also put a debug printf() into source for test only and got:
DEBUG: sizeof chan->dname = 81
test case 3:
.+chan #test2
.tcl addchanrec -HQ #test2
Tcl: 1
i also put a debug printf() into source for test only and got:
DEBUG: sizeof ch->channel = 81
test case 4:
.dcc list
[02:46:06] #-HQ# dccstat
[...]
1 0.0.0.0 0 -HQ chat flags: cptEp/0
[..]
.tcl console 1 #test mkcoblxs
Tcl: {#test} mkcoblxs
i did .dcc list to find out idx = 1 parameter for the following .tcl console
i also put a debug printf() into source for test only and got:
DEBUG: sizeof dcc[i].u.chat->con_chan = 81
test case 5:
.stick
i also put a debug printf() into source for test only and got:
DEBUG: sizeof chname = 81