Skip to content

Commit 192d1f4

Browse files
committed
Fix cupsJSONImportXxx long number error handling.
1 parent a87d4a1 commit 192d1f4

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ v3.0.3 - YYYY-MM-DD
66

77
- Now run `ldconfig` on Linux after installing the shared library (Issue #148)
88
- Fixed a potential buffer overflow in `cupsFormEncode`.
9+
- Fixed long number string error handling in `cupsJSONImportXxx`.
910

1011

1112
v3.0.2 - 2026-06-05

cups/json.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,9 @@ cupsJSONImportString(const char *s) // I - JSON string
977977
goto error;
978978

979979
current->value.number = _cupsStrScand(s, (char **)&s, loc);
980+
if (!s)
981+
goto error;
982+
980983
count ++;
981984
prev = current;
982985

0 commit comments

Comments
 (0)