Mailinglist Archive: zypp-devel (148 mails)

< Previous Next >
Re: [zypp-devel] Re: [zypp-commit] r9315 - /trunk/sat-solver/src/solvable.c
  • From: Michael Matz <matz@xxxxxxx>
  • Date: Mon, 31 Mar 2008 14:55:03 +0200 (CEST)
  • Message-id: <Pine.LNX.4.64.0803311454070.20583@xxxxxxxxxxxxx>
Hi,

On Mon, 31 Mar 2008, Klaus Kaempf wrote:

* mlandres@xxxxxxxxxxxxxxxx <mlandres@xxxxxxxxxxxxxxxx> [Mar 31. 2008 14:31]:

+ p = pool_alloctmpspace(pool, strlen(n) + strlen(e) + strlen(a) + 3);
+ sprintf(p, "%s-%s.%s", n, e, a);

Shouldn't this be a 'snprintf' for security reasons ?

No need. The line just above that sprintf allocates exactly enough
memory.


Ciao,
Michael.
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
References