Re: [PATCH v2] Fixed the segment fault when ikconfig passed nonstandard values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  static int setup_ikconfig(char *config)
> @@ -10265,8 +10273,8 @@ static int setup_ikconfig(char *config)
>                         ent++;
> 
>                 if (STRNEQ(ent, "CONFIG_")) {

Another natural fix to me is to extend the condition like:

    if (STRNEQ(ent, "CONFIG_") && strstr(ent, "=")) {

But I also think the current one is good.

> -                       add_ikconfig_entry(ent,
> -                                        &ikconfig_all[kt->ikconfig_ents++]);
> +                       if (add_ikconfig_entry(ent, &ikconfig_all[kt->ikconfig_ents]))
> +                               kt->ikconfig_ents++;
>                         if (kt->ikconfig_ents == IKCONFIG_MAX) {
>                                 error(WARNING, "ikconfig overflow.\n");
>                                 return 1;
> --
> 2.17.1
> 
> 
> 

Thanks.
HATAYAMA, Daisuke



--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux