Re: [PATCH 1/2] libmultipath: print.c: make sure lines are 0-terminated

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

 



Hi Martin,

On 05/17/2017 03:54 PM, Martin Wilck wrote:
> Under certain conditions, the output of "multipath -ll" or
> "multipathd show topology", or the multipathd logs, may
> contain garbage characters. Fix that by making sure that
> the strings are always properly zero-terminated.
> 
> Note 1: The way this is coded, the previously written
> character is overwritten by the newline. That behavior is
> unchanged by this patch. I didn't want to fuzz with the
> carefully crafted print.c code more than necessary at
> this point.
> 
> Note 2: The condition (c <= line + len - 1) is equivalent to
> (TAIL >= 0). It should always hold the way ENDLINE is called
> after PRINT and PAD in print.c, and is only added as an
> additional safeguard, e.g. against future code changes.

^^ Missing S-o-b


-- 
Johannes Thumshirn                                          Storage
jthumshirn@xxxxxxx                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux