I have earlier reported problems with nurb curves in sketches in tracker #2990066. I have now found the position in the code where the bug appears.
In function rt_sketch_export5() in the file sketch.c no space is allocated for the magic number for nurb curves , so SIZEOF_NETWORK_LONG more bytes should be allocated in this case.
ep->ext_nbytes += 3 * SIZEOF_NETWORK_LONG; /* order, pt_type, c_size */
ep->ext_nbytes += 4 * SIZEOF_NETWORK_LONG; /* magic, order, pt_type, c_size */
I my case 256 bytes were allocated for the sketch, but 260 bytes were written, corrupting the heap.