* stuff
authorArt Cancro <ajc@citadel.org>
Sat, 15 Jun 2002 22:15:03 +0000 (22:15 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 15 Jun 2002 22:15:03 +0000 (22:15 +0000)
webcit/locate_host.c
webcit/messages.c
webcit/snprintf.c
webcit/subst.c
webcit/tcp_sockets.c
webcit/vcard.c

index fce39363afd63d96a5d95bd23bef8598be6658e9..4bec272f62eec345c05d7cd77a27a1b879fe7e2c 100644 (file)
@@ -51,5 +51,4 @@ void locate_host(char *tbuf, int client_socket)
                return;
        }
        safestrncpy(tbuf, ch->h_name, 64);
-       tbuf[63] = 0;
 }
index d70184a2e206e3e4cf9afdeb08705e1b8e52ebc4..6f1dfacbf5785bec3266ac33af398e51bbc684d7 100644 (file)
@@ -69,10 +69,10 @@ char buf[];
                        end = pos;
        }
 
-       safestrncpy(urlbuf, &buf[start], end - start);
+       strncpy(urlbuf, &buf[start], end - start);
        urlbuf[end - start] = 0;
 
-       safestrncpy(outbuf, buf, start);
+       strncpy(outbuf, buf, start);
        sprintf(&outbuf[start], "%cA HREF=%c%s%c TARGET=%c%s%c%c%s%c/A%c",
                LB, QU, urlbuf, QU, QU, TARGET, QU, RB, urlbuf, LB, RB);
        strcat(outbuf, &buf[end]);
index 7c8f2b92cd4bb008465b20d0f983b1654c36d600..7db792c20827fea32b19e8a5dbd3fa51f3549dd2 100644 (file)
@@ -57,7 +57,7 @@ int vsnprintf(char *buf, size_t max, const char *fmt, va_list argp)
        if ((size = vsprintf(p, fmt, argp)) >= max)
                size = -1;
 
-       safestrncpy(buf, p, max);
+       strncpy(buf, p, max);
        buf[max - 1] = 0;
        free(p);
        return size;
index f5014eb504334974f76562dcba315853ebfe7576..095e414a169769cff408e12d16ff40b2d68a877f 100644 (file)
@@ -183,7 +183,7 @@ void do_template(void *templatename) {
                                strcpy(inbuf, "");
                        }
                        else {
-                               safestrncpy(outbuf, inbuf, pos);
+                               strncpy(outbuf, inbuf, pos);
                                outbuf[pos] = 0;
                                wprintf("%s", outbuf);
                                strcpy(inbuf, &inbuf[pos]);
@@ -191,7 +191,7 @@ void do_template(void *templatename) {
                                for (i=strlen(inbuf); i>=0; --i) {
                                        if (inbuf[i]=='>') pos = i;
                                }
-                               safestrncpy(key, &inbuf[2], pos-2);
+                               strncpy(key, &inbuf[2], pos-2);
                                key[pos-2] = 0;
                                print_value_of(key);
                                strcpy(inbuf, &inbuf[pos+1]);
index bb20bbd2ff1d91622e2b1b88cf2f5a1971bb8596..9c32b71588a744752ec4fea7101838e329ad309f 100644 (file)
@@ -54,7 +54,7 @@ int uds_connectsock(char *sockpath)
 
        memset(&addr, 0, sizeof(addr));
        addr.sun_family = AF_UNIX;
-       safestrncpy(addr.sun_path, sockpath, sizeof addr.sun_path);
+       strncpy(addr.sun_path, sockpath, sizeof addr.sun_path);
 
        s = socket(AF_UNIX, SOCK_STREAM, 0);
        if (s < 0) {
index 6b04215951ad358568839b0cf78bb5d6b935905f..f11d253b707c933b5f32ecfbb8e5ad3dd73405a2 100644 (file)
@@ -92,9 +92,9 @@ struct vCard *vcard_load(char *vtext) {
                if ((nlpos > colonpos) && (colonpos > 0)) {
                        namebuf = malloc(colonpos + 1);
                        valuebuf = malloc(nlpos - colonpos + 1);
-                       safestrncpy(namebuf, ptr, colonpos);
+                       strncpy(namebuf, ptr, colonpos);
                        namebuf[colonpos] = 0;
-                       safestrncpy(valuebuf, &ptr[colonpos+1], nlpos-colonpos-1);
+                       strncpy(valuebuf, &ptr[colonpos+1], nlpos-colonpos-1);
                        valuebuf[nlpos-colonpos-1] = 0;
 
                        if ( (!strcasecmp(namebuf, "end"))