From f840b91765fd56e055b037b4323e3f7eab0d01b9 Mon Sep 17 00:00:00 2001 From: "viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sat, 27 Sep 2008 23:01:06 +0000 Subject: BUILD : 1.7.22 (1454) BUGS : NOTES : Applied patch by w00t to fix math bug in strnrepl(). git-svn-id: svn://svn.anope.org/anope/trunk@1454 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1168 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + src/misc.c | 2 +- version.log | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 94bb9d4e3..c47dc5a4a 100644 --- a/Changes +++ b/Changes @@ -11,6 +11,7 @@ Provided by Robin Burchell - 2008 09/22 F Enabled UMODE functionality for InspIRCd 1.1 [ #00] 09/22 F Fix pointer comparison on non-ptr in CS CLEAR. [ #00] 09/23 F Possible buffer overflow in NS/CS REGISTER. [ #00] +09/27 F Incorrect maths in strnrepl(), from atheme/denora. [ #00] Anope Version 1.7.22 -------------------- diff --git a/src/misc.c b/src/misc.c index 633efd63b..68c470192 100644 --- a/src/misc.c +++ b/src/misc.c @@ -160,7 +160,7 @@ char *strnrepl(char *s, int32 size, const char *old, const char *new) if (diff > avail) break; if (diff != 0) - memmove(ptr + oldlen + diff, ptr + oldlen, left + 1); + memmove(ptr + oldlen + diff, ptr + oldlen, left + 1 - oldlen); strncpy(ptr, new, newlen); ptr += newlen; left -= oldlen; diff --git a/version.log b/version.log index 6bbb8fdc2..ba3fa8269 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="22" VERSION_EXTRA="-svn" -VERSION_BUILD="1453" +VERSION_BUILD="1454" # $Log$ # +# BUILD : 1.7.22 (1454) +# BUGS : +# NOTES : Applied patch by w00t to fix math bug in strnrepl(). +# # BUILD : 1.7.22 (1453) # BUGS : 947 # NOTES : Fixed a buffer overflow in enc_sha1. -- cgit