From: Bruce A. <ba...@gr...> - 2007-04-17 12:30:18
|
Christian, yes, I'm sure that's it. When you have a moment please apply your patch! On Tue, 17 Apr 2007, Christian Franke wrote: > Bruce Allen wrote: >> On Tue, 17 Apr 2007, Volker Kuhlmann wrote: >>> On Tue 17 Apr 2007 13:35:03 NZST +1200, Evan Klitzke wrote: >>> >>>> /dev/sda -a -d ata -n never -o on -S on -s >>>> (L/../../7/04|S/../.././02) -m root -M daily -M test >>> You're missing a line-continuation backslash at the end of the first >>> line. There still shouldn't be a segfault though, in an ideal world. >> >> As far as I know there are no mallocs(), callocs() or other calls > where >> the return value is not tested first. If there is a segfault it would > be >> nice to run the code under a debugger and fix it. The user should > only >> see a clean error message, never a segv. > > Looks like the regex sanitiy check is done even if the arg ptr is 0. > This should fix it: > > --- smartd.cpp.orig Tue Feb 27 08:39:51 2007 > +++ smartd.cpp Tue Apr 17 11:14:29 2007 > @@ -3205,7 +3205,7 @@ > // Do a bit of sanity checking and warn user if we think that > // their regexp is "strange". User probably confused about shell > // glob(3) syntax versus regular expression syntax regexp(7). > - if ((int)strlen(arg) != > (val=strspn(arg,"0123456789/.-+*|()?^$[]SLCO"))) > + else if ((int)strlen(arg) != > (val=strspn(arg,"0123456789/.-+*|()?^$[]SLCO"))) > PrintOut(LOG_INFO, "File %s line %d (drive %s): warning, > character %d (%c) looks odd in extended regular expression %s\n", > configfile, lineno, name, val+1, arg[val], arg); > break; > > Too busy to test now, sorry. > > Cheers, > > Christian > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Smartmontools-devel mailing list > Sma...@li... > https://lists.sourceforge.net/lists/listinfo/smartmontools-devel > |