I just noticed these warnings in userconfig.c - I presume they've
been there for ages, however I think they should probably be fixed.
What is happening is that some devices have descriptions that are
too long to fit into the 60 alotted characters, and resultingly
are not nul terminated.

strcpy seems to be used on these strings later, which could result
in trouble, except for the fact that the string is followed by some
flags which will usually contain a nul byte.

An I confused, or should I send-pr?

        David.

cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing
-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi  -no
stdinc -I- -I. -I../.. -I../../../include  -D_KERNEL -include opt_global.h -elf
 -mpreferred-stack-boundary=2  ../../i386/i386/userconfig.c
../../i386/i386/userconfig.c:387: warning: initializer-string for array of chars
 is too long
../../i386/i386/userconfig.c:387: warning: (near initialization for `device_info
[48].name')
../../i386/i386/userconfig.c:396: warning: initializer-string for array of chars
 is too long
../../i386/i386/userconfig.c:396: warning: (near initialization for `device_info
[57].name')



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to