minor bounds length error in mime handling

Anil Madhavapeddy <[email protected]>
Newsgroups gmane.comp.web.galeon.devel
Message-ID <20030617151806.GA29128@fork>
Patch against 1.2.10a from the OpenBSD ports tree; same
errors appears to be in 1.2.11 as well.

$OpenBSD: patch-src_mime_c,v 1.1 2003/06/17 15:13:54 avsm Exp $
--- src/mime.c.orig     Tue Jun 17 16:01:43 2003
+++ src/mime.c  Tue Jun 17 16:03:15 2003
@@ -202,7 +202,7 @@ void mime_db_save (void)
 
                /* fill out fields */
                xmlSetProp (mime_node, "name", aMimeItem->name);
-               snprintf (buffer, 5, "%d", aMimeItem->action);
+               snprintf (buffer, 3, "%d", aMimeItem->action);
                xmlSetProp (mime_node, "action", buffer);
                xmlSetProp (mime_node, "helper", aMimeItem->helperApp);
                snprintf (buffer, 3, "%d", aMimeItem->terminalHelper);



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.