<< Back to previous view

[DJSON-14] read-escaped-char doesn't handle EOF correctly Created: 28/Oct/13  Updated: 10/Jan/14  Resolved: 10/Jan/14

Status: Closed
Project: data.json
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Alexander Kiel Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File djson-14.patch    
Patch: Code and Test


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)

Comment by Alexander Kiel [ 28/Oct/13 5:01 AM ]

Quick view of patch on github: https://github.com/alexanderkiel/data.json/compare/djson-14

Comment by Stuart Sierra [ 10/Jan/14 10:12 AM ]

Patch was not in proper `git am` format. Fixed anyway on Git `master`.

Comment by Stuart Sierra [ 10/Jan/14 11:10 AM ]

Marking old issues as 'closed'

Generated at Tue Jan 23 21:15:37 CST 2018 using JIRA 4.4#649-r158309.