json: Fix parsing of strings that end with a backslash.
authorBen Pfaff <blp@nicira.com>
Wed, 25 Jun 2014 18:39:25 +0000 (11:39 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 25 Jun 2014 18:39:25 +0000 (11:39 -0700)
commit7b7c2a463d4a56c33bfb8466b8dc3b6de9494991
treee0e2790a9893613e8d14e256dab3d8f5983a0206
parent5dbebe6741b914d95e97384a09049a1bf0f34720
json: Fix parsing of strings that end with a backslash.

json_string_unescape() flagged a backslash at the end of a string as an
error, but of course "\\" is a valid string.  This fixes the problem.

VMware-BZ: #1275208
Reported-by: Michael Hu <mhu@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
lib/json.c
tests/json.at