summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:00:30 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:00:30 +0000
commit0fcd01de08412ef7279481c075fad22b7c5b345c (patch)
treec2df4567c77d9ba405dd1c8ffe63733d9623d846
parent4334f918c1263fcf7bb12c86b30fe110b67e224b (diff)
Use snprintf. Observed by Brian M. Hunt
Author: jgg Date: 2003-02-02 22:19:17 GMT Use snprintf. Observed by Brian M. Hunt
-rw-r--r--apt-pkg/acquire-item.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 717d64754..27e98283f 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-item.cc,v 1.45 2002/04/26 05:35:57 jgg Exp $
+// $Id: acquire-item.cc,v 1.46 2003/02/02 22:19:17 jgg Exp $
/* ######################################################################
Acquire Item - Item to acquire
@@ -121,7 +121,7 @@ void pkgAcquire::Item::Rename(string From,string To)
if (rename(From.c_str(),To.c_str()) != 0)
{
char S[300];
- sprintf(S,_("rename failed, %s (%s -> %s)."),strerror(errno),
+ snprintf(S,sizeof(S),_("rename failed, %s (%s -> %s)."),strerror(errno),
From.c_str(),To.c_str());
Status = StatError;
ErrorText = S;