svn commit: trunk/busybox/modutils

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Thu Dec 15 08:30:21 UTC 2005


Quoting landley at busybox.net:
> @@ -496,15 +497,13 @@
>  						if ( strcmp ( dt-> m_name, mod ) == 0 )
>  							break;
>  					}
> -					if ( dt ) {
> -#if ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS
> +					if ( ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS && dt ) {
>  						char* new_opt = NULL;
>  						while( ( opt = parse_command_string( opt, &new_opt ) ) ) {
>  							dt-> m_options = append_option( dt-> m_options, new_opt );
>  						}
> -#else
> +					} else {
>  						dt-> m_options = append_option( dt-> m_options, opt );
> -#endif
>  					}
>  				}
>  			}

That's wrong: if dt is NULL, then you'll try dt->m_options anyway!
if( dt )
  if( ENABLE_MULTIPLE_OPTIONS ) {
    while(blah) blah;
  } else {
    dt->m_options = blah(bluh);
  }
}
I'll send a patch later (at work now).

Regards,
Yann E. MORIN.

--
Yann E. MORIN
Roaming in the world...



More information about the busybox mailing list