summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-04-02 17:42:01 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-04-02 17:42:01 +0200
commit8ff84cf381c254565aa3e1837265f9991909e576 (patch)
tree488d50e13c27501903c9f057e8c5ab8ac4ba12a4 /apt-pkg/contrib
parent92d956ea4d68789fa6d15702a4c2336039dcdb0f (diff)
downloadapt-8ff84cf381c254565aa3e1837265f9991909e576.tar.gz
impossible to be too long but just to be sure use snprintf
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/strutl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 2e2bb5ebc..ace738d7a 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -699,7 +699,7 @@ string TimeRFC1123(time_t Date)
const char *Month[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul",
"Aug","Sep","Oct","Nov","Dec"};
- sprintf(Buf,"%s, %02i %s %i %02i:%02i:%02i GMT",Day[Conv.tm_wday],
+ snprintf(Buf, sizeof(Buf), "%s, %02i %s %i %02i:%02i:%02i GMT",Day[Conv.tm_wday],
Conv.tm_mday,Month[Conv.tm_mon],Conv.tm_year+1900,Conv.tm_hour,
Conv.tm_min,Conv.tm_sec);
return Buf;