* [PATCH] check file length after comment check and whitespace strip
@ 2007-09-10 7:56 Harald Hoyer
2007-09-11 15:13 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: Harald Hoyer @ 2007-09-10 7:56 UTC (permalink / raw)
To: linux-hotplug
---
udev_config.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/udev_config.c b/udev_config.c
index 3f226b9..2f2a69e 100644
--- a/udev_config.c
+++ b/udev_config.c
@@ -111,11 +111,6 @@ static int parse_config_file(void)
cur += count+1;
lineno++;
- if (count >= sizeof(line)) {
- err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno);
- continue;
- }
-
/* eat the whitespace */
while ((count > 0) && isspace(bufline[0])) {
bufline++;
@@ -128,6 +123,11 @@ static int parse_config_file(void)
if (bufline[0] = COMMENT_CHARACTER)
continue;
+ if (count >= sizeof(line)) {
+ err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno);
+ continue;
+ }
+
memcpy(line, bufline, count);
line[count] = '\0';
--
1.5.2.4
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] check file length after comment check and whitespace strip
2007-09-10 7:56 [PATCH] check file length after comment check and whitespace strip Harald Hoyer
@ 2007-09-11 15:13 ` Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2007-09-11 15:13 UTC (permalink / raw)
To: linux-hotplug
On 9/10/07, Harald Hoyer <harald@redhat.com> wrote:
> ---
> udev_config.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
Applied.
Thanks,
Kay
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-11 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-10 7:56 [PATCH] check file length after comment check and whitespace strip Harald Hoyer
2007-09-11 15:13 ` Kay Sievers
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).