openbsd-ports/security/crack/patches/patch-src_util_kickdict_c

36 lines
1.0 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-src_util_kickdict_c,v 1.1 2003/11/18 19:07:54 sturm Exp $
--- src/util/kickdict.c.orig 1996-11-05 00:01:46.000000000 +0000
+++ src/util/kickdict.c 2003-11-18 17:52:36.000000000 +0000
@@ -172,24 +172,24 @@ char *argv[];
if (this_dictgrp && this_dictgrp[0]) /* filter a dictgrp */
{
strcpy(this_rule, ":");
- sprintf(program,
- "smartcat %s/%s.* %s",
- dictgrps, this_dictgrp, this_genset);
+ snprintf(program, sizeof(program),
+ "smartcat %s/%s.* %s",
+ dictgrps, this_dictgrp, this_genset);
}
else
{
status = 3; /* dictionary stream */
strcpy(this_rule, "<stream>");
- sprintf(program, "%s", this_genset + 1);
+ snprintf(program, sizeof(program), "%s", this_genset + 1);
}
}
else if (status == 1) /* standard dictionary rule */
{
if (this_dictgrp[0])
{
- sprintf(program,
- "smartcat %s/%s.*",
- dictgrps, this_dictgrp);
+ snprintf(program, sizeof(program),
+ "smartcat %s/%s.*",
+ dictgrps, this_dictgrp);
}
else
{