So there is some weird string parsing going on tha...
# openlane
t
So there is some weird string parsing going on that must be worked around using that I guess.
u
So strange, I’ve been using that, but still crashing
t
Copy code
diff --git a/commands/CmdSubrs.c b/commands/CmdSubrs.c
index 842b026..51c9223 100644
--- a/commands/CmdSubrs.c
+++ b/commands/CmdSubrs.c
@@ -899,9 +899,9 @@ cmdWindSet(window)
 
     wDef = ((CellUse *) window->w_surfaceID)->cu_def;
     if (wDef != newRootDef)
-       (void) sprintf(caption, "%s [NOT BEING EDITED]", wDef->cd_name);
+       (void) snprintf(caption, 200, "%s [NOT BEING EDITED]", wDef->cd_name);
     else {
-       (void) sprintf(caption, "%s EDITING %s", wDef->cd_name,
+       (void) snprintf(caption, 200, "%s EDITING %s", wDef->cd_name,
                newEditDef->cd_name);
 #ifdef SCHEME_INTERPRETER
         /* Add a binding to scheme variable "edit-cell" */
👀 2
It's a function of the path length ... printing variable strings in fixed size buffers ...
That patch is just a work around, obviously the name should probably be shortened with "..." if it's too long since this is for a window title ...
u
I see it, I was so close yesterday that probably bit me…it was 2am though… thanks for the patch, testing now…
t
@Tim Edwards http://people.osmocom.org/~tnt/stuff/fix-str-overflow.diff That might be a better patch for it ...
@20Mhz Does the flow complete for you now ?
u
passed the crash, now running LVS
t
@tnt (@20Mhz): I have patched the magic source with your ("better") fix. Thanks for the diff file!. . . also for debugging the error.