View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005746 | unreal | ircd | public | 2020-08-28 10:25 | 2020-08-29 14:49 |
Reporter | KindOne | Assigned To | syzop | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 5.0.6 | ||||
Fixed in Version | 5.0.7-rc1 | ||||
Summary | 0005746: /mode #channel +l 2147483648 adds gibberish for the channel limit. | ||||
Description | The IRC'd adds gibberish " -./,),(-*,( " for the +l limit if you use anything starting from 2^31 and above. 2^31 -1, this works and adds the number as the limit.. /mode #channel +l 2147483647 2^31, this gets gibberish. /mode #channel +l 2147483648 | ||||
Steps To Reproduce | /mode #channel +l 2147483648 | ||||
Additional Information | Tested on UnrealIRCd's official network and SwiftIRC (UnrealIRCd-4.2.2) | ||||
Tags | No tags attached. | ||||
3rd party modules | |||||
|
I can indeed reproduce, but ONLY with that number... 2147483648 Above or below it just returns a number (negative, sometimes, but.. a number anyway). Same around 2^32, still numbers. Seems you found something special :D |
|
Looks like I did report it wrong, I had tested with adding/subtracting numbers and got the results below. After more testing on the UnrealIRCd network, 2^31 mode #test +l 2147483648 * KindOne sets mode: +l -./,),(-*,( 2^31 - 1 mode #test +l 2147483647 * KindOne sets mode: +l 2147483647 2^31 + 1 mode #test +l 2147483649 * KindOne sets mode: +l -2147483647 2^31 + 2^31 mode #test +l 4294967296 * KindOne sets mode: -l 2^31 + 2^31 - 1 mode #test +l 4294967295 * KindOne sets mode: +l -1 2^31 + 2^31 + 1 mode #test +l 4294967297 * KindOne sets mode: +l 1 |
|
Thanks for the report. It was a bug in the ircsnprintf function for that particular number. I fixed that but also added a range limit for +l at the same time, something I have been considering for a while. It is still possible to get some odd results if you use insane numbers, for example +l 4294967295 will become +l 1 because atoi() for that number will result a negative number and a negative becomes 1. But no more weird characters. I consider the bug sufficiently fixed, and an improvement overall. Thanks for the report! commit 8bed1cb42e5f2859f77e3b242294887574374125 (HEAD -> unreal50, origin/unreal50) Author: Bram Matthys <[email protected]> Date: Sat Aug 29 14:31:22 2020 +0200 Channel mode +l is now limited between 1 and 1 billion, so positive numbers only. This makes things more logical for end-users. This fixes https://bugs.unrealircd.org/view.php?id=5746, bug reported by KindOne. The same issue was also fixed by previous commit, but still: it is better to limit things to a narrower range, this so you don't get different behavior depending on the CPU a server uses. commit 10ecbffcaa2050796b13df8cf20e45048e5a556a Author: Bram Matthys <[email protected]> Date: Sat Aug 29 14:13:58 2020 +0200 Fix irc*printf handling of certain negative numbers |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-08-28 10:25 | KindOne | New Issue | |
2020-08-28 16:42 | syzop | Note Added: 0021724 | |
2020-08-28 17:40 | KindOne | Note Added: 0021725 | |
2020-08-29 14:49 | syzop | Assigned To | => syzop |
2020-08-29 14:49 | syzop | Status | new => resolved |
2020-08-29 14:49 | syzop | Resolution | open => fixed |
2020-08-29 14:49 | syzop | Fixed in Version | => 5.0.7-rc1 |
2020-08-29 14:49 | syzop | Note Added: 0021726 |