[OpenBIOS] [PATCH 1/2] Fix NULL-dereferencing in sunparts_open
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Sat Apr 6 19:34:41 CEST 2013
On 06/04/13 02:57, Artyom Tarasenko wrote:
> Signed-off-by: Artyom Tarasenko<atar4qemu at gmail.com>
> ---
> packages/sun-parts.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/packages/sun-parts.c b/packages/sun-parts.c
> index 2ee9613..272f7c0 100644
> --- a/packages/sun-parts.c
> +++ b/packages/sun-parts.c
> @@ -109,7 +109,7 @@ sunparts_open( sunparts_info_t *di )
> [(id)][,][filespec]
> */
>
> - if ( strlen(str) ) {
> + if ( str&& strlen(str) ) {
> /* Detect the arguments */
> if ((*str>= '0'&& *str<= '9') || (*str>= 'a'&& *str< ('a' + 8)) || (*str == ',')) {
> push_str(str);
Thanks - this is a similar bug to the one that was in mac-parts.c so
I've applied it.
ATB,
Mark.
More information about the OpenBIOS
mailing list