431f77c0362e907cff3df2bfca3f16ab591a2cae
max
  Thu Oct 11 17:25:49 2012 -0700
correction after code review #9300
diff --git src/hg/hgc/pubs.c src/hg/hgc/pubs.c
index be6da5a..d2bef58 100644
--- src/hg/hgc/pubs.c
+++ src/hg/hgc/pubs.c
@@ -350,36 +350,36 @@
     if (pubsDebug)
         printf("articleId=%s", articleId);
     printf("<I>%s</I><P>", snippets);
     printf("<HR>");
     }
 
 freeMem(sectionList);
 sqlFreeResult(&sr);
 }
 
 static char *urlToLogoUrl(char *urlOrig)
 /* return a string with relative path of logo for publisher given the url of fulltext, has to be freed */
 {
 // get top-level domain
 char url[1024];
-memcpy(url, urlOrig, 1024);
+memcpy(url, urlOrig, sizeof(url));
 char *urlParts[20];
 int partCount = chopString(url, ".", urlParts, ArraySize(urlParts));
 // construct path
-char *logoUrl = needMem(1024);
-safef(logoUrl, 1024, "../images/pubs_%s.png", urlParts[partCount-2]);
+char *logoUrl = needMem(sizeof(url));
+safef(logoUrl, sizeof(url), "../images/pubs_%s.png", urlParts[partCount-2]);
 return logoUrl;
 }
 
 static char *printArticleInfo(struct sqlConnection *conn, char *item, char *pubsArticleTable)
 /* Header with information about paper, return documentId */
 {
 char query[512];
 
 safef(query, sizeof(query), "SELECT articleId, url, title, authors, citation, abstract, pmid FROM %s WHERE articleId='%s'", pubsArticleTable, item);
 
 struct sqlResult *sr = sqlGetResult(conn, query);
 char **row;
 char *articleId=NULL;
 if ((row = sqlNextRow(sr)) == NULL)
     {