Re: Buffer overflow in disklabel
Sebastian Ssmoller <[email protected]> Sun, 20 Apr 2003 19:30:42 +0200 (MEST)
| Newsgroups | gmane.os.freebsd.devel.audit |
|---|---|
| Message-ID | <[email protected]> |
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! _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-audit To unsubscribe, send any mail to "[email protected]"
disklabel.overflow.patch
(application/octet-stream, 716 B)
--- 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);
}