85dc249d41
In addition to the standard bugfixes, this is a major port rewrite. The port now uses a '_ups' user and the CGIs created can now run under either chrooted Apache or non-chrooted Apache.
18 lines
660 B
Plaintext
18 lines
660 B
Plaintext
$OpenBSD: patch-drivers_sec_c,v 1.1 2004/02/09 06:48:48 marcm Exp $
|
|
--- drivers/sec.c.orig 2004-01-03 10:22:53.000000000 -0800
|
|
+++ drivers/sec.c 2004-01-03 10:24:29.000000000 -0800
|
|
@@ -213,11 +213,11 @@ int sec_cmd(const char mode, const char
|
|
|
|
/* create the message string */
|
|
if (*buflen > 0) {
|
|
- sprintf(msg, "%c%c%03d%s%s", SEC_MSG_STARTCHAR,
|
|
+ snprintf(msg, sizeof (msg), "%c%c%03d%s%s", SEC_MSG_STARTCHAR,
|
|
mode, (*buflen)+3, command, msgbuf);
|
|
}
|
|
else {
|
|
- sprintf(msg, "%c%c003%s", SEC_MSG_STARTCHAR,
|
|
+ snprintf(msg, sizeof (msg), "%c%c003%s", SEC_MSG_STARTCHAR,
|
|
mode, command);
|
|
}
|
|
upsdebugx(1, "PC-->UPS: \"%s\"",msg);
|