gbranden pushed a commit to branch master
in repository groff.
commit 913e0ce9361a24c4007387b2eb9f9ff540879688
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Mar 26 16:52:36 2025 -0500
src/include/json-encode.h: Use `unsigned` char.
* src/include/json-encode.h (struct json_char): Use explicitly
`unsigned` character type when employing it as a numeric value
(counting the number of `char`s necessary to JSON-encode a C/C++
character). See CMU SEI INT07-C.
---
ChangeLog | 7 +++++++
src/include/json-encode.h | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index cb0bbae63..a47e6c409 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-03-26 G. Branden Robinson <[email protected]>
+
+ * src/include/json-encode.h (struct json_char): Use explicitly
+ `unsigned` character type when employing it as a numeric value
+ {counting the number of `char`s necessary to JSON-encode a C/C++
+ character}. See CMU SEI INT07-C.
+
2025-03-26 G. Branden Robinson <[email protected]>
* src/roff/troff/input.c (main): Finish migrating to modern
diff --git a/src/include/json-encode.h b/src/include/json-encode.h
index 98bcbcf56..9e067d58a 100644
--- a/src/include/json-encode.h
+++ b/src/include/json-encode.h
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public
License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
struct json_char {
- char len;
+ unsigned char len;
char buf[7]; // '\uXXXX' + '\0'
};
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit