data.json

read-escaped-char doesn't handle EOF correctly

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

The function read-escaped-char doesn't check the int read from stream for negative values meaning end-of-file. So if you call:

(json/read-str "\"\\")

it returns

IllegalArgumentException No matching clause: -1  clojure.data.json/read-escaped-char (json.clj:122)

Activity

Alexander Kiel made changes -
Field Original Value New Value
Attachment djson-14.patch [ 12409 ]
Stuart Sierra made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Stuart Sierra made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: