chiark / gitweb /
[PATCH] more robust config file parsing in namedev.c
authorarnd@arndb.de <arnd@arndb.de>
Wed, 19 Nov 2003 05:39:30 +0000 (21:39 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:06:24 +0000 (21:06 -0700)
commit70033702cda3b13150426cd176a31713d48394d9
treee2ff9e200e0bf0648ea2bac59db354a6ba44e027
parentae2859df40ef80d15dff39fadd470a8541bab857
[PATCH] more robust config file parsing in namedev.c

After getting a number of different crashes for udev reading broken
udev.config files, I decided to try to make the parser a little
more robust.

The behaviour is changed to stop reading the configuration file
and logging the broken entry instead of silently ignoring it (is
that good? It's easy to just print and continue).
All strcpy()'s to a fixed length string are now implicitly limited
to the bounds of the target string.

I kept the -ENODEV return code for now, not sure if there should be
different ones.
namedev.c
udev.h