Created
December 12, 2012 17:57
-
-
Save anonymous/4270061 to your computer and use it in GitHub Desktop.
fix DEL (0x7F) handling in json parsing for parson lib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 7ec457c345165d8e0f4138b9d8f5e93b61cace0c Mon Sep 17 00:00:00 2001 | |
From: Fulvio Esposito <fulvio@ssl.co.uk> | |
Date: Wed, 12 Dec 2012 17:25:45 +0000 | |
Subject: [PATCH] fix DEL (0x7F) handling in string parsing | |
--- | |
parson.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/parson.c b/parson.c | |
index 73047f1..63a0df0 100644 | |
--- a/parson.c | |
+++ b/parson.c | |
@@ -331,7 +331,7 @@ static const char * get_processed_string(const char **string) { | |
return NULL; | |
break; | |
} | |
- } else if (iscntrl((unsigned char)current_char)) { /* no control characters allowed */ | |
+ } else if (iscntrl((unsigned char)current_char) && ((unsigned char)current_char != 0x7F)) { /* no control characters allowed (except DEL)*/ | |
parson_free(output); | |
return NULL; | |
} | |
-- | |
1.8.0.msysgit.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment