Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (1)
  • Rob Swindell's avatar
    Allow SAFECAT to work on uchar arrays · 1111fb24
    Rob Swindell authored
    Caught by CID 331001
    
    The use of SAFECAT() with a typecast to a pointer is not going to work as expected. This change broke line-based telnet-gateway functionality (unconfirmed, but pretty obvious).
    1111fb24
......@@ -191,7 +191,7 @@ void sbbs_t::telnet_gate(char* destaddr, ulong mode, char* client_user_name, cha
rd=getstr((char*)buf,sizeof(buf)-1,l);
if(!rd)
continue;
SAFECAT((char*)buf,crlf);
SAFECAT(buf,crlf);
rd+=2;
gotline=true;
}
......
......@@ -427,8 +427,8 @@ typedef struct {
#endif
#define SAFECAT(dst, src) do { \
if(strlen(dst) + strlen(src) < sizeof(dst)) { \
strcat(dst, src); \
if(strlen((char*)(dst)) + strlen((char*)(src)) < sizeof(dst)) { \
strcat((char*)(dst), (char*)(src)); \
} \
} while(0)
......