From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: [udev] fix for apply_format()
Date: Fri, 26 Dec 2003 01:37:37 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-107240269520672@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 97 bytes --]
fix possible NULL pointer in '%c' callout substitution
and cleanup '%D' debug text
thanks,
Kay
[-- Attachment #2: 07-apply_format-bug.diff --]
[-- Type: text/plain, Size: 903 bytes --]
diff -Nru a/namedev.c b/namedev.c
--- a/namedev.c Fri Dec 26 02:07:55 2003
+++ b/namedev.c Fri Dec 26 02:07:55 2003
@@ -200,11 +200,12 @@
case 'D':
if (strlen(udev->kernel_number) == 0) {
strcat(pos, "disc");
+ dbg("substitute devfs disc");
break;
}
strcat(pos, "part");
strcat(pos, udev->kernel_number);
- dbg("substitute kernel number '%s'", udev->kernel_number);
+ dbg("substitute devfs part '%s'", udev->kernel_number);
break;
case 'm':
sprintf(pos, "%u", udev->minor);
@@ -229,8 +230,10 @@
break;
}
}
- strcat(pos, pos3);
- dbg("substitute partial callout output '%s'", pos3);
+ if (pos3) {
+ strcat(pos, pos3);
+ dbg("substitute partial callout output '%s'", pos3);
+ }
} else {
strcat(pos, udev->callout_value);
dbg("substitute callout output '%s'", udev->callout_value);
next reply other threads:[~2003-12-26 1:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-26 1:37 Kay Sievers [this message]
2003-12-30 1:04 ` [udev] fix for apply_format() Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-107240269520672@msgid-missing \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).