From 96bc43c41ebdf43ec59d5977a7cf3450b7b6effb Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:57:21 +0000 Subject: More snprintf stuff Author: jgg Date: 2001-03-23 01:47:14 GMT More snprintf stuff --- apt-pkg/acquire-worker.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index 4805b5ebc..3b354c9f9 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-worker.cc,v 1.32 2001/02/20 07:03:17 jgg Exp $ +// $Id: acquire-worker.cc,v 1.33 2001/03/23 01:47:14 jgg Exp $ /* ###################################################################### Acquire Worker @@ -123,8 +123,6 @@ bool pkgAcquire::Worker::Start() // Fork off the process Process = ExecFork(); - - // Spawn the subprocess if (Process == 0) { // Setup the FDs @@ -369,7 +367,7 @@ bool pkgAcquire::Worker::MediaChange(string Message) LookupTag(Message,"Drive")) == false) { char S[300]; - sprintf(S,"603 Media Changed\nFailed: true\n\n"); + snprintf(S,sizeof(S),"603 Media Changed\nFailed: true\n\n"); if (Debug == true) clog << " -> " << Access << ':' << QuoteString(S,"\n") << endl; OutQueue += S; @@ -378,7 +376,7 @@ bool pkgAcquire::Worker::MediaChange(string Message) } char S[300]; - sprintf(S,"603 Media Changed\n\n"); + snprintf(S,sizeof(S),"603 Media Changed\n\n"); if (Debug == true) clog << " -> " << Access << ':' << QuoteString(S,"\n") << endl; OutQueue += S; -- cgit v1.2.3