95807c7178fd38d52564f06df9fd5b90ceca1d24 braney Wed Sep 2 11:20:44 2026 -0700 hgTracks, hgc, hgPhyloPlace: small fixes from the v503 Preview II review, refs #38172 hgTracks.c: skipBeyondDelimit returns NULL when the delimiter is absent, and the caller decremented and printed it without checking. The noYearDbs list keeps every assembly that reaches it carrying a '(' today, so nothing shows, but printf used to print "(null)" where htmlEncode now walks off the end. Fall back to the whole freeze name. gtexTracks.c: the guard before the in place truncation was two bytes stricter than the buffer needs, so a description just over the budget printed in full. Say what the buffer requirement actually is. vcfTrack.c has the same shape a byte the other way and is already right. hgPhyloPlace.c: initialize size, as the two sibling call sites do. cgiMemBlobFind always sets it when it returns a block, so this is for consistency. bigBedClick.c: hubEncode was called twice on the same string in one statement. diff --git src/hg/hgPhyloPlace/hgPhyloPlace.c src/hg/hgPhyloPlace/hgPhyloPlace.c index a124267970b..b794175da20 100644 --- src/hg/hgPhyloPlace/hgPhyloPlace.c +++ src/hg/hgPhyloPlace/hgPhyloPlace.c @@ -57,31 +57,31 @@ char *fileBinaryCoords = cartOptionalString(cart, cartVar); // Also get the file name for error reporting. safef(cartVar, sizeof cartVar, "%s__filename", fileVar); char *fileName = cartOptionalString(cart, cartVar); if (fileName == NULL) fileName = ""; if (isNotEmpty(filePlainContents)) { lf = lineFileOnString(fileName, TRUE, cloneString(trimSpaces(filePlainContents))); } else if (isNotEmpty(fileBinaryCoords)) { fprintf(stderr, "%s=%s fileBinaryCoords=%s\n", cartVar, fileName, fileBinaryCoords); /* The cart holds the address and size of the uploaded bytes, but any * request can set that variable, so only use a block cheapcgi handed out. */ - unsigned long size; + unsigned long size = 0; char *mem = cgiMemBlobFind(fileBinaryCoords, &size); if (mem != NULL) lf = lineFileDecompressMem(TRUE, mem, size); } return lf; } static void selectOrg(char **pOrg, char **pLabel) /* Search for config files in hgPhyloPlaceData. If there is more than one * supported organism, then make a menu / select input for supported organisms; * reload the page on change. */ { struct slPair *orgLabelList = phyloPlaceOrgList(cart); if (orgLabelList == NULL) errAbort("Sorry, this server is not configured to perform phylogenetic placement.");