* instead of dumb pointing to 255, search backwards from the copied amount of chars.
{
char *up, *ptr;
char buf[SIZ];
- int a, b, len;
+ int a, b, len, n;
struct urlcontent *u;
up = url;
while (!IsEmptyStr(up)) {
/** locate the = sign */
- safestrncpy(buf, up, sizeof buf);
+ n = safestrncpy(buf, up, sizeof buf);
+ if (n < 0) /** hm, we exceeded the buffer... hmmm what todo now? */
+ n = -n;
b = (-1);
- for (a = 255; a >= 0; --a)
+ for (a = n; a >= 0; --a)
if (buf[a] == '=')
b = a;
if (b < 0)
void set_preference(char *key, char *value, int save_to_server);
void knrooms(void);
int is_msg_in_mset(char *mset, long msgnum);
-char *safestrncpy(char *dest, const char *src, size_t n);
void display_addressbook(long msgnum, char alpha);
void offer_start_page(void);
void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext);