[OE-core] [oe-core][PATCH 1/1] mdadm: fix format-overflow
Khem Raj
raj.khem at gmail.com
Fri Jun 22 21:07:29 UTC 2018
On Fri, Jun 22, 2018 at 12:56 PM Martin Jansa <martin.jansa at gmail.com> wrote:
>
> See https://patchwork.openembedded.org/patch/151888/
>
yeah Martin is frugal with the extra space :) using 16 probably provides
some benefits of data being aligned hard to say
> On Fri, Jun 22, 2018 at 9:24 PM Joe Slater <joe.slater at windriver.com> wrote:
>>
>> nb[] is not quite big enough.
>>
>> Signed-off-by: Joe Slater <joe.slater at windriver.com>
>> ---
>> .../0002-mdadm-Specify-enough-length-when-write-to-buffer.patch | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch b/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch
>> index cbce053..6bbe8f4 100644
>> --- a/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch
>> +++ b/meta/recipes-extended/mdadm/files/0002-mdadm-Specify-enough-length-when-write-to-buffer.patch
>> @@ -24,6 +24,10 @@ Change the length to 47.
>>
>> Signed-off-by: Xiao Ni <xni at redhat.com>
>> Signed-off-by: Jes Sorensen <Jes.Sorensen at gmail.com>
>> +
>> +nb[] actually needs to be at least 12, but we will make it 16.
>> +
>> +Signed-off-by: Joe Slater <joe.slater at windriver.com>
>> ---
>> Upstream-Status: Backport
>> Detail.c | 2 +-
>> @@ -53,7 +57,7 @@ index 938cfd9..f5b4507 100644
>> mdp_disk_t *dp;
>> char *dv;
>> - char nb[5];
>> -+ char nb[11];
>> ++ char nb[16];
>> int wonly, failfast;
>> if (d>=0) dp = &sb->disks[d];
>> else dp = &sb->this_disk;
>> --
>> 2.7.4
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list