[parted-devel] [PATCH] parted: Escape printed device path in machine mode

Phil Susi psusi at ubuntu.com
Mon May 7 19:20:09 BST 2018


On 11/7/2017 3:01 PM, Sebastian Parschauer wrote:
> The function _print_disk_info() uses the colon ':' as the separator
> but the device path it prints can contain that character as well.
> In that case parsing fails.
> So introduce the function _escape_machine_string() to allocate an
> output string twice as big as the input string and escape ':' and
> '\' with a '\'. Print the escaped path and free it again. Ignore
> the NULL pointer dereference in out-of-memory situation like it
> is done for the other allocations in _print_disk_info() as well.

Could you add a NEWS entry and test case?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/parted-devel/attachments/20180507/f34ffb56/attachment.sig>


More information about the parted-devel mailing list