Commit graph

13 commits

Author SHA1 Message Date
Marc Durdin
373709ec79 Update km_kbp_context_api.cpp 2020-02-10 12:29:44 +11:00
Marc Durdin
9c0e31c26b fix(common/core): buffer overrun in context api
A static buffer for UTF-8 encoded characters used in debugging and test
logs did not provide enough space for SMP characters (require 6 bytes
rather than 4). This was used only for test cases and not in production
code -- outputting JSON text.

This should fix the failing keyboardprocessor test builds on Windows and
macOS.
2020-02-10 11:23:58 +11:00
Joshua A. Horton
ba769e67c3 Merge branch 'beta' into p5s2-merge 2019-02-04 21:02:15 +07:00
Tim Eves
5429037179 Fix bug #1494 potential for buffer overrun
The get/put routines now require the buffer size remaining to be read/written to permit checking and the iterator will update this value whenever iterator comparisions are made.  Other direct uses of get/put have been updated.
2019-01-17 17:12:42 +07:00
Tim Eves
a441321cf5 Newer compilers are complaining about catching std::exception derived class by value, this fixes that. 2019-01-14 09:44:43 +07:00
Tim Eves
29a5fa6d2e Add more convert function use, psuh_persist actions and various tidy-ups 2018-12-17 23:40:44 +07:00
Tim Eves
4667c5bf84 Add all the missing files that should have been in the preceding commit
Co-Authored-By: Daniel Glassey <glasseyes@users.noreply.github.com>
2018-11-30 14:46:54 +07:00
glasseyes
68aca71111 add km_kbp_context_items_from_utf8
avoids unnecessary conversions and string duplication

utf8codec private vars needed in cpp for
linker to find them?
2018-11-28 11:56:38 +07:00
Marc Durdin
1ab04f681a [Common] Code Review updates, some minor changes to API, mostly comments and tests; one bug fix 2018-11-12 19:12:59 +11:00
Tim Eves
93c76c14df Move headers into include/keyman from include/
Necessary to allow keyboardprocessor.h to refer to auxillary headers as 
<keyboard/header.h>
2018-11-06 16:19:14 +07:00
Tim Eves
333ef283c8 Make constext API more consistent and robust with use of km_kbp_status.
In addition:
Add asserts and checks to better validate the inputs.
Add documentation describing design patterns behind differet types of 
call.
2018-11-06 14:53:33 +07:00
Tim Eves
326b30c05a Stop compiler coercing utf8 pointers into bools when json printing. 2018-10-31 16:03:36 +07:00
Tim Eves
ef548606aa Move keyboardprocessor into it's new toplevel under common/engine 2018-10-25 13:43:28 +07:00
Renamed from keyboardprocessor/src/km_kbp_context_api.cpp (Browse further)