Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
sarg
sarg-2.2.5-limit_sprintf.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sarg-2.2.5-limit_sprintf.patch of Package sarg
--- sarg-2.2.5/useragent.c.orig 2008-04-24 14:21:04.000000000 +0200 +++ sarg-2.2.5/useragent.c 2008-04-24 15:11:35.000000000 +0200 @@ -101,7 +101,7 @@ strcpy(fdate,data); if(debug) { - sprintf(msg, " %s: %ld",text[10],totregsl); + snprintf(msg, sizeof(buf), " %s: %ld",text[10],totregsl); debuga(msg); } @@ -180,13 +180,13 @@ getword(user,sizeof(user),buf,'\\'); if(strcmp(user,user_old) != 0) { - sprintf(html,"<tr><td align=left bgcolor=%s><font size=%s>%s</td><td align=left bgcolor=%s><font size=%s>%s</td></tr>\n",TxBgColor,FontSize,user,TxBgColor,FontSize,agent); + snprintf(html,sizeof(html),"<tr><td align=left bgcolor=%s><font size=%s>%s</td><td align=left bgcolor=%s><font size=%s>%s</td></tr>\n",TxBgColor,FontSize,user,TxBgColor,FontSize,agent); fputs(html,fp_ht); strcpy(user_old,user); strcpy(agent_old,agent); } else { if(strcmp(agent,agent_old) != 0) { - sprintf(html,"<tr><td></td><td align=left bgcolor=%s><font size=%s>%s</td></tr>\n",TxBgColor,FontSize,agent); + snprintf(html,sizeof(html),"<tr><td></td><td align=left bgcolor=%s><font size=%s>%s</td></tr>\n",TxBgColor,FontSize,agent); fputs(html,fp_ht); strcpy(agent_old,agent); } @@ -272,14 +272,14 @@ perc=atoi(tagent) * 100; perc=perc / agentot2; - sprintf(html,"<tr><td align=left bgcolor=%s><font size=%s>%s</td><td align=right bgcolor=%s><font size=%s>%d</td><td align=right bgcolor=%s><font size=%s>%3.2f</td></tr>\n",TxBgColor,FontSize,buf,TxBgColor,FontSize,atoi(tagent),TxBgColor,FontSize,perc); + snprintf(html,sizeof(html),"<tr><td align=left bgcolor=%s><font size=%s>%s</td><td align=right bgcolor=%s><font size=%s>%d</td><td align=right bgcolor=%s><font size=%s>%3.2f</td></tr>\n",TxBgColor,FontSize,buf,TxBgColor,FontSize,atoi(tagent),TxBgColor,FontSize,perc); fputs(html,fp_ht); } fputs("</table></html>\n",fp_ht); if(strcmp(ShowSargInfo,"yes") == 0) { zdate(ftime, DateFormat); - sprintf(html,"<br><br><center><font size=-2>%s <a href='%s'>%s-%s</a> %s %s</font></center>\n",text[108],URL,PGM,VERSION,text[109],ftime); + snprintf(html,sizeof(html),"<br><br><center><font size=-2>%s <a href='%s'>%s-%s</a> %s %s</font></center>\n",text[108],URL,PGM,VERSION,text[109],ftime); fputs(html,fp_ht); } --- sarg-2.2.5/log.c.orig 2008-04-24 14:21:04.000000000 +0200 +++ sarg-2.2.5/log.c 2008-04-24 15:08:56.000000000 +0200 @@ -1059,9 +1059,9 @@ getword(ano,sizeof(ano),data,'/'); if(strcmp(df,"u") == 0) - sprintf(tbuf,"%s%s%s",ano,mes,dia); + snprintf(tbuf,sizeof(tbuf),"%s%s%s",ano,mes,dia); if(strcmp(df,"e") == 0) - sprintf(tbuf,"%s%s%s",dia,mes,ano); + snprintf(tbuf,sizeof(tbuf),"%s%s%s",dia,mes,ano); builddia(dia,mes,ano,df,wdata); idata=atoi(wdata); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor