summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.c
Commit message (Collapse)AuthorAgeFilesLines
* Correct spelling errors in comments and documentation, but also non-comment pooryorick2023-04-121-4/+4
| | | corrections in history.tcl and tcltest.test.
* Fix 2 warnings: warning C4018: '>': signed/unsigned mismatchjan.nijtmans2022-03-121-2/+2
|
* Revise the loop logic to be more correct, more clear, and more consistendgp2022-03-111-2/+2
| | | with other branches.
* Alternatve patch to replace UB treatment of int overflow.dgp2022-03-111-13/+16
|
* Fix [9c7557160]: signed integer overflow in UpdateStringOfByteArray()jan.nijtmans2022-03-081-2/+2
|
* Fix [d282fcacd1]: signed integer overflow in ScanNumber()jan.nijtmans2022-02-231-2/+2
|
* Tcl_NewObj() -> TclNewObj()jan.nijtmans2022-01-171-5/+5
|
* Fix [816913a65e]: GrowStringBuffer(): signed integer overflow. And a few ↵jan.nijtmans2022-01-131-1/+1
| | | | similar situations in other place
* Fix [ac6792195d]: avoid signed integer overflow in BinaryEncodeUu()jan.nijtmans2021-12-121-3/+4
|
* Missing static.dgp2021-11-061-1/+1
|
* Make more use of the Tcl_ObjCmdProc typedef for tidier branch merging.dgp2021-11-061-24/+8
|
* More implicit type-casts, for better compatibility with C++jan.nijtmans2021-02-051-13/+13
|
* Get rid of "register" keyword, forbidden in c++20.jan.nijtmans2020-11-261-4/+4
| | | Fix some more warnings, discovered in c20/c++20 mode
* Fix [https://core.tcl-lang.org/tk/tktview?name=3bc0f44ef3|3bc0f44ef3]: UBSan ↵jan.nijtmans2020-09-111-5/+5
| | | | | complains about body.chars[] usage. (Yes, I know, this one is for Tk, but Tcl was using the same construct too ....)
* Eliminate many unnecessary type-casts, mostly (size_t) when value is already ↵jan.nijtmans2020-08-111-8/+8
| | | | size_t or int
* Merge 8.5. More usage of UCHAR() macro.jan.nijtmans2020-05-061-1/+1
|\
* | Re-join utf-6.93.0 and utf-6.93.1 (please disregard comment in previous ↵jan.nijtmans2020-05-031-8/+8
| | | | | | | | | | commit, it was not correct). Perfectionalize TclUtfToUCS4()/TclUCS4Complete() and new (internal) function TclUCS4ToUtf(). They can help preventing bugs regarding splitting/joining surrogates. Used them in a few more places.
* | Retrict -wrapchar values to those that can be decoded.dgp2020-03-311-1/+31
| |
* | Other suggested solution for [b8e82d293b]jan.nijtmans2020-03-311-1/+2
| |
* | Optimize [binary decode hex] to process bytearray without string generationdgp2020-03-301-6/+13
| | | | | | when it can.
* | Optimize [binary decode uuencode] to process bytearray without stringdgp2020-03-301-4/+11
| | | | | | generation when it can.
* | [8edfcedfa0] [binary encode base64] build a string instead of a bytearraydgp2020-03-281-4/+21
| | | | | | whenever it might be required to get the right result.
* | Make sure maxlen value does not rely on ordering of options.dgp2020-03-281-3/+3
| |
* | Revise comment that was a plain lie.dgp2020-03-281-8/+2
| |
* | Missing error codes from decoder routines.dgp2020-03-281-0/+2
| |
* | Optimize base64 decoder to work on bytearrays without string generation.dgp2020-03-281-11/+14
| |
* | [ffeb2097af] Restore the standard and original practice of ignoring invaliddgp2020-03-281-7/+2
| | | | | | characters when decoding base64. Error only in -strict mode. See RFC 2045.
* | Further improvement. Report invalid multi-byte characters accurately.dgp2020-03-271-5/+15
| |
* | Improve error reporting. If codepoint looks negative, bad char is reporteddgp2020-03-271-1/+1
| | | | | | as REPLACEMENT CHARACTER, which is wrong, therefore not helpful.
* | More uppercase HEX representations in source-code.jan.nijtmans2020-03-181-27/+27
| |
* | minor cleanup of source code formattingdkf2019-06-091-61/+78
| |
* | Minor code style cleanup.dkf2019-04-231-1/+4
| |
* | Backport [bd94500678e837d7] from 8.7, preventing endless loops in UTF-8 ↵jan.nijtmans2019-03-021-2/+2
| | | | | | | | conversions when handling surrogates. Only effective when compiling with -DTCL_UTF_MAX=4|6 (default: 3). Meant for benefit of Androwish.
* | Replace isspace() -> TclIsSpaceProc() _everywhere_. jan.nijtmans2019-01-261-7/+7
| | | | | | Change TclIsSpaceProc() and TclIsBareWord so it works with both signed and unsigned characters. Actually, this is not a signature change, as "char" arguments are enlarged to "int" by the C-compiler anyway.
* | fixes segfault [00d04c4f12], unfulfilled base64 (strict and non-strict mode, ↵sebres2018-11-151-2/+9
| | | | | | | | etc).
* | Better UTF-8 surrogate handling, only functional when TCL_UTF_MAX>3jan.nijtmans2017-06-081-3/+3
| |
* | Tcl_UtfToUniChar() -> TclUtfToUniChar() in various places: No change in ↵jan.nijtmans2017-05-291-3/+3
| | | | | | | | functionality, just faster if ASCII only strings are involved.
* | [6015221f59] Segfault after overflow of [binary] field specifier numeric count.dgp2017-05-051-1/+9
|\ \ | |/
| * [6015221f59] Segfault after overflow of [binary] field specifier numeric count.dgp2017-05-051-1/+9
| |
| * Backport of bytearray append machinery to support bug fixes in ReadBytes.dgp2014-01-211-0/+92
| |
* | [2992970] Restore the safety of Tcl_AppendObjToObj(x, x) for bytearrays.dgp2014-01-151-41/+33
| | | | | | | | | | | | | | | | | | Also moves overflow checking to TclAppendBytesToByteArray() and adds the ability to call TABTBA() with bytes==NULL, for appending unspecified bytes. That is, the string grows, but the new bytes are of undetermined value. Like Tcl_NewByteArrayObj(NULL, length) this option is useful for manipulating buffers. The TABTBA growth algorithm is also enhanced a bit, copying over a fuller implementation from GrowStringBuffer() in tclStringObj.c
* | Tcl_SetResult -> Tcl_SetObjResultjan.nijtmans2013-09-261-2/+4
| |
* | Refactor to remove unused flexibility.dkf2013-09-161-12/+10
| |
* | Be careful: separator needs to be bytes, not internal-encoded.dkf2013-09-161-7/+10
| |
* | Add back -wrapchar option to "binary encode uuencode"jan.nijtmans2013-09-151-6/+13
|\ \
| * | Hm, this check doesn't really add anything.jan.nijtmans2013-09-141-6/+0
| | |
| * | Add back -wrapchar option to "binary encode uuencode".jan.nijtmans2013-09-141-6/+19
| | |
* | | And the decoder too.dkf2013-09-141-18/+86
|/ /
* | [2152292] Corrected implementation of uuencoding.dkf2013-09-141-4/+121
| |
* | [b98fa55285]: Fix handling of whitespace at end of hex strings to decode.dkf2013-09-011-20/+23
| |