[Exim] Another small patch, please comment

Page principale
Supprimer ce message
Répondre à ce message
Auteur: michael
Date:  
À: exim-users
Sujet: [Exim] Another small patch, please comment
Hello,

string_cat appends len characters to a string, extending its size
if needed. At least I thought that's what it does, but in fact it
appends less characters, if there is a \0 in the string to be appended,
leaving the rest uninitialised. My patch changes that, and it is probably
slightly more efficient, too. It should not cause trouble anywhere in
Exim, but if you think it might, please speak up. I don't want to screw
up something badly just because it works for me.

Michael
----------------------------------------------------------------------
--- string.c.orig      2003-04-03 15:31:24.000000000 +0200
+++ string.c    2003-04-03 15:32:06.000000000 +0200
@@ -826,7 +826,7 @@
     }
   }


-Ustrncpy(string + p, s, len);
+memcpy(string + p, s, len);
*ptr = p + len;
return string;
}