Comment 19 for bug 11223

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Wed, 5 Jan 2005 20:34:24 +0000
From: Steve Kemp <email address hidden>
To: Pekka Savola <email address hidden>
Cc: Florian Weimer <email address hidden>, Martin Schulze <email address hidden>,
 <email address hidden>, <email address hidden>
Subject: Re: A backport of PHP fixes for 4.1.2

On Wed, Jan 05, 2005 at 10:13:52PM +0200, Pekka Savola wrote:
> I'd welcome more eyeballs looking at it, correct any mistakes and
> omissions (if any :).

  Looks good, except this bit seems dodgy:

- memcpy(ptr, CWDG(cwd).cwd, CWDG(cwd).cwd_length);
- ptr += CWDG(cwd).cwd_length;
+ *ptr++ = '\'';
+ while (dir_length > 0) {
+ switch (*dir) {
+ case '\'':
+ *ptr++ = '\'';
+ *ptr++ = '\\';
+ *ptr++ = '\'';
+ /* fall-through */

  Is ptr going to be big enough? For every ' character it's incremented
 several times.

  This may become clear when more context is present, but it's the
 only thing that I'd be wanting to look more closely at.

Steve
-