ucspi-ssl  0.99e
TLS encryption for IPv6 communication
stralloc_opyb.c
Go to the documentation of this file.
1 /* Public domain. */
2 
3 #include "stralloc.h"
4 #include "byte.h"
5 
6 int stralloc_copyb(stralloc *sa,const char *s,unsigned int n)
7 {
8  if (!stralloc_ready(sa,n + 1)) return 0;
9  byte_copy(sa->s,n,s);
10  sa->len = n;
11  sa->s[n] = 'Z'; /* ``offensive programming'' */
12  return 1;
13 }
int stralloc_copyb(stralloc *sa, const char *s, unsigned int n)
Definition: stralloc_opyb.c:6
void byte_copy(void *, unsigned int, const void *)