Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Apr 2003 19:30:42 +0200 (MEST)
From:      Sebastian Ssmoller <sebastian.ssmoller@gmx.net>
To:        Andre Guibert de Bruet <andy@siliconlandmark.com>
Cc:        audit@freebsd.org
Subject:   Re: Buffer overflow in disklabel
Message-ID:  <21183.1050859842@www6.gmx.net>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
hmm, I do not understand this. 

so third try: now I will try sending the patch from the web client of my
mail provider. hope that works.

if not: is there a special requirement to be able to send attachments to the
freebsd lists ?

seb

> 
> On Sun, 20 Apr 2003, Sebastian Ssmoller wrote:
> 
> > sorry. seem to have a problem with my email client :-( Hope the
> > attachment is now there...
> 
> No patch here. How about putting it up on a webserver somewhere?
> 
> > Andre Guibert de Bruet | Enterprise Software Consultant >
> > Silicon Landmark, LLC. | http://siliconlandmark.com/    >
> 

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
[-- Attachment #2 --]
--- disklabel.c.orig	Tue Apr 15 07:57:53 2003
+++ disklabel.c	Tue Apr 15 08:46:26 2003
@@ -283,14 +283,16 @@
 
 	dkname = argv[0];
 	if (dkname[0] != '/') {
-		(void)sprintf(np, "%s%s%c", _PATH_DEV, dkname, 'a' + RAW_PART);
+		(void)snprintf(np, BBSIZE, "%s%s%c", _PATH_DEV, dkname, 
+		    'a' + RAW_PART);
 		specname = np;
 		np += strlen(specname) + 1;
 	} else
 		specname = dkname;
+
 	f = open(specname, op == READ ? O_RDONLY : O_RDWR);
 	if (f < 0 && errno == ENOENT && dkname[0] != '/') {
-		(void)sprintf(specname, "%s%s", _PATH_DEV, dkname);
+		(void)snprintf(specname, BBSIZE, "%s%s", _PATH_DEV, dkname);
 		np = namebuf + strlen(specname) + 1;
 		f = open(specname, op == READ ? O_RDONLY : O_RDWR);
 	}

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?21183.1050859842>