Fixed OID encoding.
[crypto.git] / lib / silcutil / silcbuffmt.c
index 3c96f862ca1338f7bc93888a60407c170ff3adc2..fb251a8f4e774212541caf594bf02252688682fd 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2005 Pekka Riikonen
+  Copyright (C) 1997 - 2006 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -602,7 +602,7 @@ int silc_buffer_sstrformat(SilcStack stack, SilcBuffer dst, ...)
       goto ok;
 
     slen = strlen(string);
-    d = silc_srealloc_ua(stack, len, dst->head,
+    d = silc_srealloc_ua(stack, len + 1, dst->head,
                         sizeof(*dst->head) * (slen + len + 1));
     if (!d)
       return -1;