72f52f9a6f62d9a4af6a0d0483b25f7024550b26 braney Thu Dec 5 11:15:14 2013 -0800 don't crash if given file names with ':' in them. Fixes #12267 diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c index 8b567dd..547b843 100644 --- src/hg/lib/trackHub.c +++ src/hg/lib/trackHub.c @@ -511,30 +511,34 @@ AllocVar(hub); hub->url = cloneString(url); hub->name = cloneString(hubName); hub->settings = hubRa; /* Fill in required fields from settings. */ trackHubRequiredSetting(hub, "hub"); trackHubRequiredSetting(hub, "email"); hub->shortLabel = trackHubRequiredSetting(hub, "shortLabel"); hub->longLabel = trackHubRequiredSetting(hub, "longLabel"); hub->genomesFile = trackHubRequiredSetting(hub, "genomesFile"); lineFileClose(&lf); char *genomesUrl = trackHubRelativeUrl(hub->url, hub->genomesFile); +if (genomesUrl == NULL) + errAbort("badly formatted genomesFile setting (%s) in hub %s\n", + hub->genomesFile, hub->url); + hub->genomeHash = hashNew(8); hub->genomeList = trackHubGenomeReadRa(genomesUrl, hub); freez(&genomesUrl); return hub; } void trackHubClose(struct trackHub **pHub) /* Close up and free resources from hub. */ { struct trackHub *hub = *pHub; if (hub != NULL) { trackHubGenomeFreeList(&hub->genomeList); freeMem(hub->url);