]> code.citadel.org Git - citadel.git/blobdiff - webcit/messages.c
* Use safestrncpy() instead of strncpy() where appropriate
[citadel.git] / webcit / messages.c
index 198cc4b58acd6df14fdcf2875f7f2521106408ad..d70184a2e206e3e4cf9afdeb08705e1b8e52ebc4 100644 (file)
@@ -69,11 +69,10 @@ char buf[];
                        end = pos;
        }
 
-       strncpy(urlbuf, &buf[start], end - start);
+       safestrncpy(urlbuf, &buf[start], end - start);
        urlbuf[end - start] = 0;
 
-
-       strncpy(outbuf, buf, start);
+       safestrncpy(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]);