[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] fixdep: avoid underflow when end of entry doesn't coincide with EOF
From:       Arsen =?utf-8?Q?Arsenovi=C4=87?= <arsen () gentoo ! org>
Date:       2023-03-01 9:28:23
Message-ID: 86ilfkq0qh.fsf () gentoo ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Denys Vlasenko <vda.linux@googlemail.com> writes:

> Applied, thank you.

Thanks, have a lovely day.

> On Tue, Feb 21, 2023 at 8:24 PM Arsen Arsenović <arsen@gentoo.org> wrote:
>>
>> Bug: https://bugs.gentoo.org/893776
>> Closes: https://bugs.busybox.net/show_bug.cgi?id=15326
>> Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
>> ---
>> Hi,
>>
>> This is a fix for the recently reported scandep-related build failure.
>> The linked Gentoo bug also includes a write-up explaining how the error
>> happens.
>>
>> Thanks in advance, have a lovely day.
>>
>>  scripts/basic/fixdep.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
>> index 426b4888b..66be73aad 100644
>> --- a/scripts/basic/fixdep.c
>> +++ b/scripts/basic/fixdep.c
>> @@ -338,6 +338,11 @@ void parse_dep_file(void *map, size_t len)
>>                         do p--; while (!isalnum((unsigned char)*p));
>>                         p++;
>>                 }
>> +               if (p < m) {
>> +                       /* we've consumed the last filename of this list
>> +                          already.  */
>> +                       break;
>> +               }
>>                 memcpy(s, m, p-m); s[p-m] = 0;
>>                 if (strrcmp(s, "include/autoconf.h") &&
>>                     strrcmp(s, "arch/um/include/uml-config.h") &&
>> --
>> 2.39.2
>>
>> _______________________________________________
>> busybox mailing list
>> busybox@busybox.net
>> http://lists.busybox.net/mailman/listinfo/busybox


-- 
Arsen Arsenović

["signature.asc" (application/pgp-signature)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic