server code. Various commands now includes the CF_LAG_STRICT
flag to disallow any kind of miss-use of the command.
+ * Fixed the silc_buffer_unformat to not to allocate any data
+ if the length of the data is zero. It used to allocate the
+ length + 1. Affected file lib/silcutil/silcbuffmt.c.
+
Wed Mar 14 16:10:30 EET 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
* Changed the format of AdminConnection configuration section
SILC_GET16_MSB(len2, src->data);
silc_buffer_pull(src, 2);
HAS_SPACE(src, len2);
- if (x) {
+ if (x && len2) {
*x = silc_calloc(len2 + 1, sizeof(unsigned char));
memcpy(*x, src->data, len2);
}
SILC_GET32_MSB(len2, src->data);
silc_buffer_pull(src, 4);
HAS_SPACE(src, len2);
- if (x) {
+ if (x && len2) {
*x = silc_calloc(len2 + 1, sizeof(unsigned char));
memcpy(*x, src->data, len2);
}
HAS_SPACE(src, len2);
if (len)
*len = len2;
- if (x) {
+ if (x && len2) {
*x = silc_calloc(len2 + 1, sizeof(unsigned char));
memcpy(*x, src->data, len2);
}