1085258edb736464f12732c1bdec74ae1182875b braney Sat May 23 18:04:37 2026 -0700 Increase several fixed-size string buffers in web.c from 128 to 4096. Co-Authored-By: Claude Opus 4.7 (1M context) diff --git src/hg/lib/web.c src/hg/lib/web.c index 5c118dcbaa5..76d43b490e4 100644 --- src/hg/lib/web.c +++ src/hg/lib/web.c @@ -649,32 +649,32 @@ void webAbort(char* title, char* format, ...) /* an abort function that outputs a error page */ { va_list args; va_start(args, format); webAbortExt(TRUE, title, format, args); va_end(args); } void printCladeListHtml(char *genome, char *event, char *javascript) /* Make an HTML select input listing the clades. */ { char **row = NULL; -char *clades[128]; -char *labels[128]; +char *clades[4096]; +char *labels[4096]; char *defaultClade = hClade(genome); char *defaultLabel = NULL; int numClades = 0; if (hubConnectIsCurated(trackHubSkipHubName(genome))) defaultClade = hClade(trackHubSkipHubName(genome)); else defaultClade = hClade(genome); struct sqlConnection *conn = hConnectCentral(); // after hClade since it access hgcentral too // get only the clades that have actual active genomes char query[4096]; sqlSafef(query, sizeof query, "SELECT DISTINCT(c.name), c.label " // mysql 5.7: SELECT list w/DISTINCT must include all fields in ORDER BY list (#18626) ", c.priority " "FROM %s c, %s g, %s d WHERE c.name=g.clade AND d.organism=g.genome AND d.active=1 " @@ -814,32 +814,32 @@ void printAllAssemblyListHtmlParm(char *db, struct dbDb *dbList, char *dbCgi, bool allowInactive, char *event, char *javascript) /* Prints to stdout the HTML to render a dropdown list containing the list * of assemblies for the current genome to choose from. By default, * this includes only active assemblies with a database (with the * exception of the default assembly, which will be included even * if it isn't active). * param db - The default assembly (the database name) to choose as selected. * If NULL, no default selection. * param allowInactive - if set, print all assemblies for this genome, * even if they're inactive or have no database */ { -char *assemblyList[128]; -char *values[128]; +char *assemblyList[4096]; +char *values[4096]; int numAssemblies = 0; struct dbDb *cur = NULL; char *genome = hGenome(db); char *selAssembly = NULL; if (genome == NULL) #ifdef LOWELAB genome = "Pyrococcus furiosus"; #else genome = "Human"; #endif for (cur = dbList; cur != NULL; cur = cur->next) { /* Only for this genome */ if (!sameWord(genome, cur->genome)) @@ -1590,31 +1590,31 @@ struct slName *jsList = slNameListFromString(addJs, ','); for(; jsList; jsList = jsList->next) jsIncludeFile(jsList->name, NULL); slNameFreeList(&jsList); } } char *menuBar(struct cart *cart, char *db) // Return HTML for the menu bar (read from a configuration file); // we fixup internal CGI's to add hgsid's and include the appropriate js and css files. // // Note this function is also called by hgTracks which extends the menu bar // with a View menu defined in hgTracks/menu.c { char *docRoot = hDocumentRoot(); -char *menuStr, buf[4096], uiVars[128]; +char *menuStr, buf[4096], uiVars[4096]; FILE *fd; char *navBarFile = "inc/globalNavBar.inc"; struct stat statBuf; char *scriptName = cgiScriptName(); if (cart) safef(uiVars, sizeof(uiVars), "%s=%s", cartSessionVarName(), cartSessionId(cart)); else uiVars[0] = 0; if(docRoot == NULL) // tolerate missing docRoot (i.e. don't bother with menu when running from command line) return NULL; jsIncludeFile("jquery.js", NULL); jsIncludeFile("jquery.plugins.js", NULL);