2727d941e00bc74cc9fe53851ccc16172965646d hiram Tue Sep 29 22:35:07 2026 -0700 a track name too long caused a buffer overflow, claude advice here fixes this problem, track to test is in GenArk assembly GCA_020740595.1 in the "LiftOver Ring-tailed lemur (2021-11-04) minimap2 Lift Over Chained Alignments" track refs #34360 diff --git src/hg/hgTracks/halSnakeTrack.c src/hg/hgTracks/halSnakeTrack.c index 44e04960efa..e7a0dfe1c1d 100644 --- src/hg/hgTracks/halSnakeTrack.c +++ src/hg/hgTracks/halSnakeTrack.c @@ -1667,31 +1667,31 @@ } if (firstLf != NULL) { slSort(&firstLf->components, snakeFeatureCmpQStart); firstLf->next = 0; } } static void loadLinks(struct track *tg, int seqStart, int seqEnd, enum trackVisibility vis) // load up the chain elements into linkedFeatures { int start, end, extra; -char fullName[64]; +char fullName[HDB_MAX_TABLE_STRING]; int maxOverLeft = 0, maxOverRight = 0; int overLeft, overRight; struct linkedFeatures *lf; struct lm *lm; struct hash *hash; /* Hash of chain ids. */ struct sqlConnection *conn; lm = lmInit(1024*4); hash = newHash(0); conn = hAllocConn(database); /* Make up a hash of all linked features keyed by * id, which is held in the extras field. */ for (lf = tg->items; lf != NULL; lf = lf->next) { char buf[256]; @@ -1701,31 +1701,31 @@ overRight = lf->end - seqEnd; if (overRight > maxOverRight) maxOverRight = overRight; overLeft = seqStart - lf->start ; if (overLeft > maxOverLeft) maxOverLeft = overLeft; } if (hash->size) { boolean isSplit = TRUE; /* Make up range query. */ safef(fullName, sizeof fullName, "%s_%s", chromName, tg->table); if (!hTableExists(database, fullName)) { - strcpy(fullName, tg->table); + safecpy(fullName, sizeof fullName, tg->table); isSplit = FALSE; } /* in dense mode we don't draw the lines * so we don't need items off the screen */ if (vis == tvDense) doQuery(conn, fullName, lm, hash, seqStart, seqEnd, isSplit, -1); else { /* if chains extend beyond edge of window we need to get * elements that are off the screen * in both directions so we know whether to draw * one or two lines to the edge of the screen. */