sic, branch HEAD simple irc client 058547e707e961e0cb7f8af4877f1b92f4c6d888 2021-05-06T10:18:21Z 2021-05-06T10:20:30Z [1.3] util: trim() fix for UB on pointer arithmetic Hiltjo Posthuma hiltjo@codemadness.org commit 058547e707e961e0cb7f8af4877f1b92f4c6d888 parent 68c1c4e5110ed6a30cd3da0ae0c2ab0753e02cbb Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 6 May 2021 12:18:21 +0200 util: trim() fix for UB on pointer arithmetic Follow-up fix on commit df4c0611366bf361fa263fbc57009cbe68456855 " While it is true reversing the condition solves a single-byte read at one before s, there is a second instance of UB. Having a pointer to one before an object is in of itself UB in C, it's on the side of language lawyering, but it's UB. I add here a quote from a C standard draft: > When an expression that has integer type is added to or subtracted > from a pointer, the result has the type of the pointer operand. > If both the pointer operand and the result point to elements of the > same array object, or one past the last element of the array object, > the evaluation shall not produce an overflow; otherwise, the > behavior is undefined. Taken from: http://www.iso-9899.info/n1570.html#6.5.6p8 " Thanks Guilherme Janczak <guilherme.janczak@yandex.com> fe525b32095b1575ddccda34658881262d4c9a1b 2013-05-05T15:42:52Z 2013-05-05T15:42:52Z [1.2] prepared a new release Anselm R Garbe anselm@garbe.us commit fe525b32095b1575ddccda34658881262d4c9a1b parent a28f8b49c83f20586f67722ef745e96470f1ffeb Author: Anselm R Garbe <anselm@garbe.us> Date: Sun, 5 May 2013 17:42:52 +0200 prepared a new release 6af1b812ae862a64e0c92060b993b591a72d741e 2010-05-14T17:01:20Z 2010-05-14T17:01:20Z [1.1] cleanup Anselm R Garbe anselm@garbe.us commit 6af1b812ae862a64e0c92060b993b591a72d741e parent 75d42255f22a40935ced8b2e4c134996f8efebe2 Author: Anselm R Garbe <anselm@garbe.us> Date: Fri, 14 May 2010 18:01:20 +0100 cleanup 2a372e2df178fc6912a004591e5049ebadcf4afc 2008-07-29T18:18:03Z 2008-07-29T18:18:03Z [1.0] made Makefile consistent Anselm R Garbe garbeam@gmail.com commit 2a372e2df178fc6912a004591e5049ebadcf4afc parent 888ab2272511712707dc4f43f80f1264b784d555 Author: Anselm R Garbe <garbeam@gmail.com> Date: Tue, 29 Jul 2008 19:18:03 +0100 made Makefile consistent 82946e102dd8ca48b8a8df710c20bef94c649af0 2007-02-13T15:14:52Z 2007-02-13T15:14:52Z [0.9] setting the topic must not be supported, its a trivial IRC command (*and rarely used btw*) Anselm R. Garbe arg@suckless.org commit 82946e102dd8ca48b8a8df710c20bef94c649af0 parent 7ef7529687d3e15aee3fe7fb6e6dceb3027ffd92 Author: Anselm R. Garbe <arg@suckless.org> Date: Tue, 13 Feb 2007 16:14:52 +0100 setting the topic must not be supported, its a trivial IRC command (*and rarely used btw*) 0a903a0c79d47885d6ecdb492988a6372665f1cb 2007-01-31T10:01:34Z 2007-01-31T10:01:34Z [0.8] using Tcmd successors more carefully Anselm R. Garbe arg@suckless.org commit 0a903a0c79d47885d6ecdb492988a6372665f1cb parent 8edb0e23f4491a14a24883125a3a87b5392b56d1 Author: Anselm R. Garbe <arg@suckless.org> Date: Wed, 31 Jan 2007 11:01:34 +0100 using Tcmd successors more carefully 44e0417e14c2f0a59c8688cdaf6b7d485ff7bdea 2007-01-11T10:35:02Z 2007-01-11T10:35:02Z [0.7] applied some segfault patches of Adrien Krunch Kunysz (thanks to Adrien!) Anselm R. Garbe arg@suckless.org commit 44e0417e14c2f0a59c8688cdaf6b7d485ff7bdea parent 148029905b9d0a06333cb43834eb819385561ab5 Author: Anselm R. Garbe <arg@suckless.org> Date: Thu, 11 Jan 2007 11:35:02 +0100 applied some segfault patches of Adrien Krunch Kunysz (thanks to Adrien!) 73e181ce5bf93c857b843396efff154b02730f2d 2006-11-09T16:37:57Z 2006-11-09T16:37:57Z [0.6] fixed a small grammar typo arg@mig29 unknown commit 73e181ce5bf93c857b843396efff154b02730f2d parent 9197fee8a9045b9555ffe12387524b2fc4a16805 Author: arg@mig29 <unknown> Date: Thu, 9 Nov 2006 17:37:57 +0100 fixed a small grammar typo fe306465d022f6565adf74924fa7367c949558f0 2006-10-23T08:56:06Z 2006-10-23T08:56:06Z [0.5] same problem in sic as in dmenu Anselm R. Garbe arg@suckless.org commit fe306465d022f6565adf74924fa7367c949558f0 parent 1f3f048ab768bc22f743c6b66b4a1039767eddd4 Author: Anselm R. Garbe <arg@suckless.org> Date: Mon, 23 Oct 2006 10:56:06 +0200 same problem in sic as in dmenu 3160fd2bedd1ff19a72a25113d6b48bad30cdfff 2006-10-12T06:03:37Z 2006-10-12T06:03:37Z [0.4] hotfix Anselm R. Garbe arg@10kloc.org commit 3160fd2bedd1ff19a72a25113d6b48bad30cdfff parent 560111d4ba0603fa8bfd2784980de421f97dd287 Author: Anselm R. Garbe <arg@10kloc.org> Date: Thu, 12 Oct 2006 08:03:37 +0200 hotfix 78e0c4f9ee1b689aff5b33c9aac1b86bf93ce6b3 2006-09-26T12:27:31Z 2006-09-26T12:27:31Z [0.3] new tag arg@mmvi unknown commit 78e0c4f9ee1b689aff5b33c9aac1b86bf93ce6b3 parent b3412f0a14d081f013d582f78e4d86a70ae82c27 Author: arg@mmvi <unknown> Date: Tue, 26 Sep 2006 14:27:31 +0200 new tag e9f9154ab78f612b21e325d37180d36452b52266 2006-07-21T19:12:29Z 2006-07-21T19:12:29Z [0.2] made sic 0.2 arg@10ksloc.org unknown commit e9f9154ab78f612b21e325d37180d36452b52266 parent 9d87b90d50b8901d7a6bfe4b06b633a30fb9797f Author: arg@10ksloc.org <unknown> Date: Fri, 21 Jul 2006 21:12:29 +0200 made sic 0.2 f615283ce95de748c5bc56c130fc57f5b086c78d 2006-07-20T08:29:10Z 2006-07-20T08:29:10Z [0.1] small fix arg@10ksloc.org unknown commit f615283ce95de748c5bc56c130fc57f5b086c78d parent 8e623e944694fb7ce3ccf369892e4c656c2f926b Author: arg@10ksloc.org <unknown> Date: Thu, 20 Jul 2006 10:29:10 +0200 small fix