openbsd-ports/databases/gnats/patches/patch-gnats_nquery-pr_c
brad 9e8ecfb2f4 Fix some security issues with gnats.
Some additional fixes from millert@
sprintf -> snprintf
str{cat,cpy} -> strl{cat,cpy}

http://marc.theaimsgroup.com/?l=bugtraq&m=105638591907836&w=2

ok naddy@
2003-08-25 23:33:56 +00:00

17 lines
528 B
Plaintext

$OpenBSD: patch-gnats_nquery-pr_c,v 1.1 2003/08/25 23:35:06 brad Exp $
--- gnats/nquery-pr.c.orig Tue Sep 21 17:18:39 1999
+++ gnats/nquery-pr.c Wed Jul 2 13:23:13 2003
@@ -444,10 +444,10 @@ ask_about (info, args)
cmd = "QURY";
buf = (char *) xmalloc (current);
- strcpy (buf, cmd);
+ strlcpy (buf, cmd, current);
while (args[i])
{
- sprintf (buf, "%s %s", buf, args[i]);
+ snprintf (buf, current, "%s %s", buf, args[i]);
len += strlen (args[i++]) + 1;
if (args[i] == NULL)
break;