Re: [PATCH] Cleanup option keyword/environment substitution

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

 



On 2011-10-28 02:17, Steven Lang wrote:
> Right now the substitution for options seems quite fragile.  Among the
> issues...

That's definitely true, it was a quick hack that never got the 2nd round
of look over it should have had. So thanks for doing this!

> - If bc had an error and returned no output, it caused a NULL reference
> - Multiple variable substitutions (For example $ncpus * $pagesize)
> caused an error as it tried to run bc after the first, with the second
> still text
> - Memory leak for every keyword substituted
> - Multiplication caused shell wildcard expansion (*) of the current
> directory when passing the input to bc
> - Shell escape sequences would be parsed on the command line when bc is called
> - Potential buffer overrun due to unchecked lengths on the input line
> 
> So I did a little cleanup to get rid of the issues.  This patch also
> moves the environment variable substitution to run before the keyword
> substitution, so an environment variable can now indirectly perform a
> keyword substitution.

Thanks, applied to both master and stable-1.x.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux