~ubuntu-branches/ubuntu/natty/sarg/natty

« back to all changes in this revision

Viewing changes to debian/patches/opensuse_6_limit_useragent_sprintf.patch

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2010-01-11 15:07:10 UTC
  • mfrom: (1.1.8 upstream) (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100111150710-mgvjhyjs13mrg0tb
Tags: 2.2.6-1
* New upstream release
  - Fixes issues in getword loop detection (Closes: #522284)
  - Removed patches integrated upstream
  - Fixes usertab parsing for IPv6 address (Closes: #504749)
  - Fixes typo in dansguardian_log.c (Closes: #540438)
  - Fixes error parsing squidGuard logs (Closes: #486895)

* debian/sarg-reports.conf
  - Fixed typo (Closes: #517356)

* debian/control
  - Added Build-Dep options on libgd2-xpm-dev (Closes: #540121)
  - Added Dependency on ${misc:Depends}
  - Added dependency on dpatch
  - Bumped Standard-Version to 3.8.3

* debian/compat
  - Upgraded debhelper compatibility to level 6

* debian/rules
  - Removed unnecessary upgrade of autoconf files
  - Added dpatch rules
  - Fixed configuration options and paths

* debian/patches/01_makefile-install-path
  - Fixed build-time installation paths

* debian/patches/02_config-file-references
  - Fixed references to configuration files

* debian/squid.conf
  - Sinced with upstream changes

* debian/{postrm,preinst,sarg.conf,sarg-reports,rules,dirs,sarg-reports.conf}
  - Moved configuration files to /etc/sarg and data directory to /var/lib/sarg
    (Closes: #553554, #502273)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- sarg-2.2.5/useragent.c.orig 2008-04-24 15:11:35.000000000 +0200
2
 
+++ sarg-2.2.5/useragent.c      2008-04-24 15:40:13.000000000 +0200
3
 
@@ -146,7 +146,7 @@
4
 
    else
5
 
       show_sarg(fp_ht,"..");
6
 
    fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ht);
7
 
-   sprintf(html,"<tr><th align=center colspan=2><b><font color=%s size=+1>%s</font></b></th></tr>\n",TiColor,text[105]);
8
 
+   snprintf(html,sizeof(html),"<tr><th align=center colspan=2><b><font color=%s size=+1>%s</font></b></th></tr>\n",TiColor,text[105]);
9
 
    fputs(html,fp_ht);
10
 
 
11
 
    fputs("<tr><td></td></tr><tr><td></td></tr>",fp_ht);
12
 
@@ -154,14 +154,14 @@
13
 
 
14
 
    fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ht);
15
 
 
16
 
-   sprintf(html,"<tr><td align=right bgcolor=%s><font size=%s>%s:</font><td align=left bgcolor=%s><font size=%s>%s - %s</font></td></td></tr>\n",HeaderBgColor,FontSize,text[89],TxBgColor,FontSize,idate,fdate);
17
 
+   snprintf(html,sizeof(html),"<tr><td align=right bgcolor=%s><font size=%s>%s:</font><td align=left bgcolor=%s><font size=%s>%s - %s</font></td></td></tr>\n",HeaderBgColor,FontSize,text[89],TxBgColor,FontSize,idate,fdate);
18
 
    fputs(html,fp_ht);
19
 
 
20
 
    fputs("</table></center>\n",fp_ht);
21
 
    fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ht);
22
 
    fputs("<tr><td></td><td></td></tr>",fp_ht);
23
 
 
24
 
-   sprintf(html,"<tr><th align=left bgcolor=%s><font size=%s color=%s>%s</font></th><th bgcolor=%s align=left><font size=%s color=%s>%s</font></th></tr>\n",HeaderBgColor,FontSize,HeaderColor,text[98],HeaderBgColor,FontSize,HeaderColor,text[106]);
25
 
+   snprintf(html,sizeof(html),"<tr><th align=left bgcolor=%s><font size=%s color=%s>%s</font></th><th bgcolor=%s align=left><font size=%s color=%s>%s</font></th></tr>\n",HeaderBgColor,FontSize,HeaderColor,text[98],HeaderBgColor,FontSize,HeaderColor,text[106]);
26
 
    fputs(html,fp_ou);
27
 
 
28
 
    while(fgets(buf,sizeof(buf),fp_in)!=NULL) {
29
 
@@ -228,7 +228,7 @@
30
 
 
31
 
       if(strcmp(agent,agent_old) != 0) {
32
 
          agentdif++;
33
 
-         sprintf(html,"%06d %s\n",agentot,agent_old);
34
 
+         snprintf(html,sizeof(html),"%06d %s\n",agentot,agent_old);
35
 
          fputs(html,fp_ou);
36
 
          strcpy(agent_old,agent);
37
 
          agentot2+=agentot;
38
 
@@ -236,7 +236,7 @@
39
 
       }
40
 
    }
41
 
    agentdif++;
42
 
-   sprintf(html,"%06d %s\n",agentot,agent);
43
 
+   snprintf(html,sizeof(html),"%06d %s\n",agentot,agent);
44
 
    fputs(html,fp_ou);
45
 
    agentot2+=agentot;
46
 
 
47
 
@@ -263,7 +263,7 @@
48
 
    fputs("<br><br>\n",fp_ht);
49
 
 
50
 
    fputs("<center><table cellpadding=0 cellspacing=0>\n",fp_ht);
51
 
-   sprintf(html,"<tr><th align=left bgcolor=%s><font size=%s color=%s>%s</font></th><th bgcolor=%s align=left><font size=%s color=%s>%s</font></th><th align=center bgcolor=%s><font size=%s color=%s>%%</font></th></tr>\n",HeaderBgColor,FontSize,HeaderColor,text[106],HeaderBgColor,FontSize,HeaderColor,text[107],HeaderBgColor,FontSize,HeaderColor);
52
 
+   snprintf(html,sizeof(html),"<tr><th align=left bgcolor=%s><font size=%s color=%s>%s</font></th><th bgcolor=%s align=left><font size=%s color=%s>%s</font></th><th align=center bgcolor=%s><font size=%s color=%s>%%</font></th></tr>\n",HeaderBgColor,FontSize,HeaderColor,text[106],HeaderBgColor,FontSize,HeaderColor,text[107],HeaderBgColor,FontSize,HeaderColor);
53
 
    fputs(html,fp_ht);
54
 
 
55
 
    while(fgets(buf,sizeof(buf),fp_in)!=NULL) {