added space in the utf buffer to handle 3-char characters
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 30 Nov 2006 15:09:32 +0000 (15:09 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 30 Nov 2006 15:09:32 +0000 (15:09 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@804 9efc2488-bf62-4759-914b-345cdb29e865

src/objson/json_parser.c

index 80f2b53..5ed5cd6 100644 (file)
@@ -490,8 +490,8 @@ int json_parse_json_string(char* string, unsigned long* index, jsonObject* obj,
                                        /* ----------------------------------------------------------------------- */
                                        /* The following chunk was borrowed with permission from 
                                                json-c http://oss.metaparadigm.com/json-c/ */
-                                       unsigned char utf_out[3];
-                                       memset(utf_out,0,3);
+                                       unsigned char utf_out[4];
+                                       memset(utf_out,0,4);
 
                                        #define hexdigit(x) ( ((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)