Changeset: 3da52474958e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3da52474958e
Modified Files:
        monetdb5/modules/atoms/json.c
Branch: Jul2017
Log Message:

Fix the JSON parse crash

We need to make sure that the buffer allocated for the exception, is not freed
twice.


diffs (13 lines):

diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c
--- a/monetdb5/modules/atoms/json.c
+++ b/monetdb5/modules/atoms/json.c
@@ -43,8 +43,8 @@
                char *msg;                                                      
                                                        \
                if (jt) {                                                       
                                                        \
                        msg = jt->error;                                        
                                                \
+                       jt->error = NULL;                                       
                                                \
                        JSONfree(jt);                                           
                                                \
-                       jt->error = NULL;                                       
                                                \
                } else {                                                        
                                                        \
                        msg = createException(MAL, "json.new", 
MAL_MALLOC_FAIL);        \
                }                                                               
                                                                \
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to