summaryrefslogtreecommitdiff
path: root/src/basic/hexdecoct.c
Commit message (Collapse)AuthorAge
* hexdecoct: drop an unnecessary checkYu Watanabe2018-08-24
|
* basic: fix comment styleYu Watanabe2018-08-24
|
* hexdecoct: ignore whitespace within the input hexadecimal text of unhexmem()Yu Watanabe2018-08-24
|
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* tree-wide: use TAKE_PTR() and TAKE_FD() macrosYu Watanabe2018-08-24
|
* coccinelle: make use of DIV_ROUND_UP() wherever appropriateLennart Poettering2018-08-24
| | | | Let's use our macros where we can
* Prep v236 : Add missing SPDX-License-Identifier (2/9) src/basicSven Eden2018-03-26
|
* hexdecoct: fix comment typo (#7548)Lennart Poettering2017-12-05
|
* util-lib,tests: rework unbase64 so that we skip over whitespace ↵Lennart Poettering2017-12-03
| | | | | | | | | | automatically (#7522) Let's optimize things a bit, and instead of having to strip whitespace first before decoding base64, let's do that implicitly while doing so. Given that base64 was designed the way it was designed specifically to be tolerant to whitespace changes, it's a good idea to do this automatically and implicitly.
* hexdcoct: dump to stdout if FILE* is specified as NULLLennart Poettering2017-10-27
| | | | | We do a logic like that at various other places, let's do it here too, to make this as little surprising as possible.
* hexdecoct: slightly extend the unbase64mem() API and relatedLennart Poettering2017-10-27
| | | | | | | | | If the string length is specified as (size_t) -1, let's use that as indicator for determining the length on our own. This makes it slightlier shorter to invoke these APIs for a very common case. Also, do some minor other coding style updates, and add assert()s here and there.
* Prep v235: Add missing includes and dependencies.Sven Eden2017-08-14
|
* Prep v235: Apply upstream fixes (3/10) [src/basic]Sven Eden2017-08-14
|
* hexdecoct: use typesafe new() instead of malloc()Lennart Poettering2017-07-17
|
* util-lib: be stricter when decoding hex stringsLennart Poettering2017-07-17
| | | | | If a hex string has an uneven length, generate an error instead of silently assuming a trailing '0' was in place.
* tree-wide: make ++/-- usage consistent WRT spacingVito Caputo2017-06-16
| | | | | | Throughout the tree there's spurious use of spaces separating ++ and -- operators from their respective operands. Make ++ and -- operator consistent with the majority of existing uses; discard the spaces.
* Add memcpy_safeZbigniew Jędrzejewski-Szmek2017-06-16
| | | | | | | | | | | | | | | | | ISO/IEC 9899:1999 §7.21.1/2 says: Where an argument declared as size_t n specifies the length of the array for a function, n can have the value zero on a call to that function. Unless explicitly stated otherwise in the description of a particular function in this subclause, pointer arguments on such a call shall still have valid values, as described in 7.1.4. In base64_append_width memcpy was called as memcpy(x, NULL, 0). GCC 4.9 started making use of this and assumes This worked fine under -O0, but does something strange under -O3. This patch fixes a bug in base64_append_width(), fixes a possible bug in journal_file_append_entry_internal(), and makes use of the new function to simplify the code in other places.
* Prep v229: Remove remaining emacs settings [1/6] src/basicSven Eden2017-05-17
|
* basic: include only what we useThomas Hindoe Paaboel Andersen2017-05-17
| | | | | This is a cleaned up result of running iwyu but without forward declarations on src/basic.
* resolved: add alignment to base64Zbigniew Jędrzejewski-Szmek2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We try to fit the lengthy key data into available space. If the other fields take less than half of the available columns, we use align everything in the remaining columns. Otherwise, we put everything after a newline, indented with 8 spaces. This is similar to dig and other tools do. $ COLUMNS=78 ./elogind-resolve -t any . . IN SOA a.root-servers.net nstld.verisign-grs.com 2016012701 1800 900 604800 86400 . IN RRSIG SOA RSASHA256 0 86400 20160206170000 20160127160000 54549 S1uhUoBAReAFi5wH/KczVDgwLb+B9Zp57dSYj9aX4XxBhKuzccIducpg0wWXhjCRAWuzY fQ/J2anm4+C4BLUTdlytPIemd42SUffQk2WGuuukI8e67nkrNF3WFtoeXQ4OchsyO24t2 rxi682Zo9ViqmXZ+MSsjWKt1jdem4noaY= . IN NS h.root-servers.net . IN NS k.root-servers.net . IN NS e.root-servers.net . IN NS c.root-servers.net . IN NS b.root-servers.net . IN NS g.root-servers.net . IN NS d.root-servers.net . IN NS f.root-servers.net . IN NS i.root-servers.net . IN NS j.root-servers.net . IN NS m.root-servers.net . IN NS a.root-servers.net . IN NS l.root-servers.net . IN RRSIG NS RSASHA256 0 518400 20160206170000 20160127160000 54549 rxhmTVKUgs72G3VzL+1JRuD0nGLIrPM+ISfmUx0eYUH5wZD5XMu2X+8PfkAsEQT1dziPs ac+zK1YZPbNgr3yGI5H/wEbK8S7DmlvO+/I9WKTLp/Zxn3yncvnTOdjFMZxkAqHbjVOm+ BFz7RjQuvCQlEJX4PQBFphgEnkiOnmMdI= . IN NSEC aaa ( NS SOA RRSIG NSEC DNSKEY ) . IN RRSIG NSEC RSASHA256 0 86400 20160206170000 20160127160000 54549 HY49/nGkUJJP1zLmH33MIKnkNH33jQ7bsAHE9itEjvC4wfAzgq8+Oh9fjYav1R1GDeJ2Z HOu3Z2uDRif10R8RsmZbxyZXJs7eHui9KcAMot1U4uKCCooC/5GImf+oUDbvaraUCMQRU D3mUzoa0BGWfxgZEDqZ55raVFT/olEgG8= . IN DNSKEY 257 3 RSASHA256 AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0 O8gcCjFFVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0 NfnfL2MTJRkxoXbfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL4 96M/QZxkjf5/Efucp2gaDX6RS6CXpoY68LsvPVjR0ZSwzz1ap AzvN9dlzEheX7ICJBBtuA6G3LQpzW5hOA2hzCTMjJPJ8LbqF6 dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relSQageu+ipAdTTJ2 5AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulqQxA+Uk1 ihz0= . IN DNSKEY 256 3 RSASHA256 AwEAAbr/RV0stAWYbmKOldjShp4AOQGOyY3ATI1NUpP4X1qBs 6lsXpc+1ABgv6zkg02IktjZrHnmD0HsElu3wqXMrT5KL1W7Sp mg0Pou9WZ8QttdTKXwrVXrASsaGI2z/pLBSnK8EdzqUrTVxY4 TEGZtxV519isM06CCMihxTn5cfFBF . IN RRSIG DNSKEY RSASHA256 0 172800 20160204235959 20160121000000 19036 XYewrVdYKRDfZptAATwT+W4zng04riExV36+z04kok09W0RmOtDlQrlrwHLlD2iN/zYpg EqGgDF5T2xlrQdNpn+PFHhypHM7NQAgLTrwmiw6mGbV0bsZN3rhFxHwW7QVUFAvo9eNVu INrjm+sArwxq3DnPkmA+3K4ikKD2iiT/jT91VYr9SHFqXXURccLjI+nmaE7m31hXcirX/ r5i3J+B4Fx4415IavSD72r7cmruocnCVjcp+ZAUKeMyW+RwigzevLz3oEcCZ4nrTpGLEj wFaVePYoP+rfdmfLfTdmkkm4APRJa2My3XOdGFlgNS1pW1pH4az5LapLE2vMO7p1aQ== -- Information acquired via protocol DNS in 14.4ms. -- Data is authenticated: no
* Prep v228: Add remaining updates from upstream (1/3)Sven Eden2017-04-26
The util.[hc] files have been stripped of a lot of functions, that got sorted into various new files representing the type of utility. This commit adds the missing files.